Open N1ebieski opened 4 years ago
I've just spent a fair bit of time trying to get this to work from the ngrok config and seeing if the ngrok command was editable somewhere but it isn't.
ngrok http -config=c:\laragon\bin\ngrok\conf\my.custom.domain.yml -region=au -host-header=rewrite my.custom.domain:80
If Laragon ran a similar command to launch ngrok then custom virtual hosts would work. -host-header=rewrite is required
Add the virtual host as a tunnel in the generated config file. Allows end users to customise all ngrok settings
c:\laragon\bin\ngrok\conf\my.custom.domain.yml
web_addr: localhost:4041
tunnels:
laragon:
addr: my.custom.domain:80
proto: http
host_header: rewrite
ngrok launch command
ngrok start -config=c:\laragon\bin\ngrok\conf\my.custom.domain.yml -region=au laragon
@improved-software : Nice solution. I will add it to the TODO
@leokhoa Glad it might be useful. Would make the share really powerful being able to configure each project as needed.
I really sincerely appreciate the work you have done with Laragon and making it available. I only came across it within the last year, but it's saving me a lot of time compared to my previous setup.
Definitely made a difference in my life, so thank you Sir ;)
@improved-software: I'm so glad to hear that :) Cheers!
Ngrok works if folder project is simple like "test", but if name contains dots like "test.net.pl", then Ngrok uses default vhost - 00.default.conf and show Index of projects in root folder.
Solution is rewriting the Host header > https://ngrok.com/docs#http-host-header