Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

magento.test’s server IP address could not be found. #1153

Closed
jcroftpradco opened this issue May 8, 2024 · 7 comments
Closed

magento.test’s server IP address could not be found. #1153

jcroftpradco opened this issue May 8, 2024 · 7 comments

Comments

@jcroftpradco
Copy link

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

@jcroftpradco
Copy link
Author

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

@YevhenZvieriev
Copy link
Contributor

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.

@itnavigate
Copy link

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

@mblaw1011
Copy link

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

You saved my life!

@devmousam
Copy link

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

@markshust
Copy link
Owner

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.

@devmousam
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants