Virtual host url can’t be reached


  • | 267 points

    I use Windows 10 home.

    I created a blank app via Quick app menu and named it myapp.

    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 the drivers\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 to Apache>sites-enabled.

    I also entered the command ipconfig /flushdns in cmd 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


  • administrators
    | 120219 points

    @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
    

  • | 267 points

    @leokhoa
    Didn't get response:

    Ping request could not find host myapp.test. Please check the name and try again.
    

  • administrators
    | 120219 points

    @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


  • | 267 points

    @leokhoa
    Thanks. The problem was because of some duplicated domains in hosts file.


  • administrators
    | 120219 points

    @samyrooster : You're welcome - I am glad you sorted it out :)


Log in to reply
 

Looks like your connection to Laragon was lost, please wait while we try to reconnect.