Skip to content

Instantly share code, notes, and snippets.

@mjvdende
Forked from ilgityildirim/ngrok.md
Created June 13, 2018 12:44
Show Gist options
  • Save mjvdende/9c42fb4952343e49400bbaf074f33d9a to your computer and use it in GitHub Desktop.
Save mjvdende/9c42fb4952343e49400bbaf074f33d9a to your computer and use it in GitHub Desktop.
Tunnel your local work to the internet using Ngrok
  • Download Ngrok first & unzip it & enter its directory
$ chmod +x ngrok
$ cp ngrok /usr/local/bin
  • Now try if everything is OK (in a directory where ngrok file doesn't exist). If you see Ngrok help, it means everything is OK.
$ ngrok -help
  • Start a webserver redirect to localhost;
ngrok http -host-header=mysite.dev mysite.dev:80
  • Alternatively you can directly redirect the traffic to localhost:80
ngrok http :80
  • If you access the localhost on a different port, you also need to change the used port. Say you are using 8080;
ngrok http :8080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment