Virtual host url can’t be reached
-
I use Windows 10 home.
I created a blank app via
Quick app
menu and named itmyapp
.But the
http://myapp.test
is not accessible and it returns:This site can’t be reached myapp.test’s server IP address could not be found. DNS_PROBE_FINISHED_NXDOMAIN
The
localhost
url works well and it returns Laragon default startup page. But the virtual host urls is not.
I have checked thedrivers\etc\hosts
and the virtual host is added to it:127.0.0.1 myapp.test #laragon magic!
I also tried with IE and Edge browsers but it returns the same error.
The
auto.myapp.test.conf
is added toApache>sites-enabled
.I also entered the command
ipconfig /flushdns
incmd
but no changes.I always start laragon as admininstrator.
I have no problem in Windows 7 with Laragon. But I have this issue in my Windows 10.
I also tried to change Apache port (8000) but not success for virtual host urls.
Also switched to Nginx (8080) but exactly the same problem.
What's the problem?
Thanks
-
@samyrooster : The root cause of the issue is related to DNS. Can you show me the result when you ping?
ping myapp.test
Or
nslookup myapp.test
-
@leokhoa
Didn't get response:Ping request could not find host myapp.test. Please check the name and try again.
-
@samyrooster : That's the point. For some reasons your hosts file doesn't work. I think it is related to permission (Read property of the file).
You can follow this article to sort it out:
https://serverfault.com/questions/452268/hosts-file-ignored-how-to-troubleshoot
-
@leokhoa
Thanks. The problem was because of some duplicated domains in hosts file.
-
@samyrooster : You're welcome - I am glad you sorted it out