ngrok can be used to provide access to a local homestead or vagrant site remotely i.e. to a client.
You need to use header rewriting to work with the homestead configuration, the syntax for using a single site looks like:
ngrok http -host-header=rewrite mysite.app:80
If you have multiple sites then you will need to use ngrok with a config file, stored in ~/.ngrox.config.yml
. The docs are vague on how to do the rewriting in the config file so here it is for reference:
tunnels:
mysite:
addr: mysite.app:80
proto: http
host_header: rewrite
myapi:
addr: myapi.app:80
proto: http
host_header: rewrite
Note that host header rewriting doesn’t work nicely with cookies which seriously limits this.
See http://stackoverflow.com/questions/41523847/fail-to-create-cookies-while-using-ngrok-with-header-rewrite