Create a simple web server for testing
while true; do { echo -e 'HTTP/1.1 200 OK\r\n'; cat index.html; } | nc -l 80; done
Create tunneling so that the web server can be accessible from Internet
Download ngrok from https://ngrok.com/download
Extract the installer file (ZIP) and run following command:
./ngrok 80
If you need a custom domain so you start ngrok http -subdomain=yourcustomdomain 80
, you need to pay.
Otput of the command above:
ngrok by @inconshreveable (Ctrl+C to quit)
Tunnel Status online
Version 2.1.3
Region United States (us)
Web Interface http://127.0.0.1:4040
Forwarding http://86776c81.ngrok.io -> localhost:80
Forwarding https://86776c81.ngrok.io -> localhost:80
Connections ttl opn rt1 rt5 p50 p90
0 0 0.00 0.00 0.00 0.00
Access using browser to http://86776c81.ngrok.io