Ngrok+Laragon serving Root Document instead Project

  • | 378 points


    I select Ngrok->Share ->ole. In console it appears:
    Forwarding ->

    But what appears in the browser is the root of Laragon:
    C:\laragon\www instead C:\laragon\www\ole as I would expect

    Can anyone please tell me what is wrong here?

    Thank you.

  • administrators
    | 131219 points

    @ivomir : What is your Laragon's version?
    You should use .test domain to avoid any unwanted issues.

  • | 378 points

    I just fixed my problem. Instead of using www.{name}.dev as hostname. I am now using {name}.dev and it's working. I don't really understand why. Is there a way to make www. and non www. hostname pointing to localhost without manually editing hosts?

    I still have a problem with:
    RewriteEngine on
    RewriteCond %{HTTPS} off
    RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]

    This works without ngrok but with ngrok I get too many redirects... weird... Shouldn't this condition only trigger if the request is not https?

    But if I comment this condition everything seems to work fine :)

  • | 358 points

    I confirm that having a subdomain still doesn't work with Laragon (4.0.15 190704) + ngrok (2.3.34).

    • Tried to use local.{name}.com - didn't work, the document root was displayed on shared url

    • But when changed to {name}.local - worked as expected

    Https is still a problem though, posted a temporary workaround in another thread:

Log in to reply

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