aschmelyun / docker-compose-wordpress

A docker-compose workflow for local WordPress development
241 stars 151 forks source link

localhost is accessible instead of wordpress-docker.test #7

Open aadi-khan opened 3 years ago

aadi-khan commented 3 years ago

Hi there,

I've followed along with these settings but I am not able to access the installation on 'wordPress-docker.test' but I can access the localhost to install.

I am using Ubuntu 20 LTS on my windows 10 over WSL 2.

Localhost does not use the SSL either.

gralka commented 2 years ago

Hi @aadi-khan!

Have you included a new entry in the /etc/hosts file on your WSL instance to point to 127.0.0.1 to wordpress-docker.test? If you haven't done so, your browser won't know where wordpress-docker.test is, and any other attempts to find it through DNS will fail because the domain doesn't exist—it's a test domain.

In this case, we want it to understand that it is the same location as localhost. You'll want to add a line in the block towards the top of the file. The first few lines should look something like this (although, in your case, perhaps it won't look exactly the same):

127.0.0.1    localhost
127.0.0.1    wordpress-docker.test

Hope this helps!