Wednesday, 19 January 2022

Use ngrok as tunnels to localhost

set up

  1. register an account at ngrok
  2. download ngrok and unzip
  3. find authtoken
  4. ./ngrok authtoken 23siywfFYojsSVe8ojvO0yTEgf4_7dsx9NCr9cZHoc7gb3abc

./ngrok authoken .. only needs to run once. It will create a ~/.ngrok2/ngrok.yml

usage

If have used /etc/host define different domains, use -host-header flag

./ngrok http  --host-header local.mowedhdhmedia.com 80

If only have to point to localhost

./ngrok http 80

copy the url generated by ngrok. This url can be accessed from anywhere to connect to your local host.

No comments:

Post a Comment