magento.test’s server IP address could not be found.
I have followed your instructions from "Set up Magento with the automated onelinesetup script" video.
I was able to successfully install Magento. When I typed bin/magento -V it returned: "Magento CLI 2.4.7"
but when I go to https://magento.test/ I get the following error:
This site can’t be reached magento.test’s server IP address could not be found. Try:
Checking the connection Checking the proxy, firewall, and DNS configuration ERR_NAME_NOT_RESOLVED
magento container in docker is running.
thanks for you help
I got this fixed by editing my /etc/hosts file. I put my IP address and magento.test on one in the hosts file. thanks
Hi @jcroftpradco,
It's bizarre because the one-liner should do this.
In the future, you can use the bin/setup-domain script, it adds a domain entry to the /etc/hosts file if it is not there.
This solution only works if you are running the browser on the same device as the docker host. The additional step required if your browser is running from a different machine, is to create an entry in your local hosts file manually. e.g. Add this to the hosts file:
aaa.bbb.ccc.ddd magento.test
where aaa.bbb.ccc.ddd is replaced by the IP address of your host running docker, and
magento.test references with the hostname that you wish to use
This solution only works if you are running the browser on the same device as the docker host. The additional step required if your browser is running from a different machine, is to create an entry in your local hosts file manually. e.g. Add this to the hosts file:
aaa.bbb.ccc.ddd magento.testwhere aaa.bbb.ccc.ddd is replaced by the IP address of your host running docker, and
magento.test references with the hostname that you wish to use
You saved my life!
I have added in hosts file but still it is not working for me.
my hosts file looks like below -
[network]
generateHosts = false
127.0.0.1 localhost 127.0.1.1 Mousam. Mousam
The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters 127.0.0.1 magento.test
All you need in your /etc/hosts file is:
127.0.0.1 ::1 magento.test
Or, replace magento.test with whatever domain you set up is. 127.0.0.1 is your local machine, and ::1 is the ipv6 address of the same (or so I think it is?). That's all you need and it should be good to go.
The install does this out of the box, so I'm closing out this issue as unable to replicate.
Thank you @markshust , actually I was adding in the wrong file. We need to add in this file - C:\Windows\System32\drivers\etc\hosts
My issue is resolved.