Ngrok+Laragon serving Root Document instead Project


  • | 378 points

    Hello,

    I select Ngrok->Share ->ole. In console it appears:
    Forwarding http://4f937fca.eu.ngrok.io -> www.ole.dev:80

    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
    | 115186 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 :)


  • | 328 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: https://forum.laragon.org/topic/752/http-to-https-redirect-causes-err_too_many_redirects-on-ngrok


Log in to reply
 

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