ngix, cannot reach auto virtual host (pretty urls) on windows 8.1

  • | 250 points

    I cannot reach the pretty urls created by laragon.

    If I type localhost/appname I reach the app without problems.
    If I type appname.myapp I cannot reach the app.
    appname.myapp has been added to the windows hosts file without problems
    If I try to ping appname.myapp I don't get a response

    Now, an interesting thing: if I use .dev as an extension, I receive a response when I ping but in the browser it is still impossible to reach my app.

    I think the problem is with my network configuration, but I don't even know what to search in order to find possible solutions.

    All suggestions are appreciated.
    That said: Laragon looks like a great timesaving tool. I'm looking forward to use it in the months to come.

  • administrators
    | 131219 points

    @dven: How about using .dev with Firefox?

  • | 250 points

    I tried on chrome and firefox both, but I can't reach the .dev

  • | 501 points

    restart nginx

  • | 123 points

    I had a similar issue on Windows 10 I just resolved. My pretty URLS were not working, but localhost was.
    After checking nginx access and error logs I don't think it was my folder permissions and paths.

    If you right click in "Laragon > Preferences" , enable "Auto Virtual Hosts". I had to turn off my anti-virus for this to work and then restart nginx.

  • | 250 points

    @tonyshi thank you for your suggestion, I tried it but even this doesn't work. I think it's a problem with windows and not with laragon, and now I just connect to localhost/projectname and that's it.

    Thanks again.

  • | 453 points

    I have the same problem.
    I chose apache and it runs on win10.
    I can acces my laravel project at localhost/myproject/public but not on It jumps to localhost instead.
    The checkbox is checked and I can see that the url is created in my hostfile.
    Any other suggestions to resolve this?

    ps: Thanks for the creation of Laragon. I waisted far to much time on trying to get Homestead working and failed.

  • | 453 points

    Is it possible that the proxy at my work has anything to do with this?
    When i try ngrok I get also an error: " reconnecting (Non-200 response from proxy server: 407 Proxy Authentication Required)"
    Maybe these issues are related?

  • administrators
    | 131219 points

    @Rydeck : Yes, your proxy may cause some unexpected results.
    Open Terminal, what do you see with this command?

    curl -iL

  • | 453 points

    @leokhoa This command shows me the correct html I should be seeing in the browser.
    After some investigation i could see that the browser shows me in de dev tool a response of 301 (permenant move) of This seems to be cached in the browser without expirationdate. In Firefox I could enter after I cleaned the cache en turned the proxy off. This didn't work in Chrome.
    I need the proxy to do the other internet stuff so I don't want to switch constantly between proxy and no-proxy settings. Any ideas?

  • administrators
    | 131219 points

    @Rydeck : curl works --> It means your browsers are using proxy that cause the issue. Root cause found!
    Now, the solution is simple: you can install another Chrome based browsers (with no proxy) for development :)

  • | 453 points

    @leokhoa Can I switch the proxy setting of one Chrome off and of another Chrome (for example a portable one) on?
    I thought Chrome uses the system settings for these and they apply for all.
    In Firefox I disabled the proxy and indeed it works but I prefer to develop in Chrome.

  • administrators
    | 131219 points

    @Rydeck : If another portable Chrome works for you, it is a solution.
    If not, there are many Chrome based browsers or alternatives:

    You can develop in Chrome and use another browsers with proxy or vice versa.

Log in to reply

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