You can open the localhost application to the internet with an intermediary (ngrok) and perform tests and experiments.
The procedures in the current step may vary, so it is more reasonable to go to the specified website to access the current
steps.
Steps for many platforms are available in the specified link.
This gist is based on Linux.
- You have to Sign Up to that site if you don't before
- Install ngrok via Apt with the following command:
curl -s https://ngrok-agent.s3.amazonaws.com/ngrok.asc \
| sudo tee /etc/apt/trusted.gpg.d/ngrok.asc >/dev/null \
&& echo "deb https://ngrok-agent.s3.amazonaws.com buster main" \
| sudo tee /etc/apt/sources.list.d/ngrok.list \
&& sudo apt update \
&& sudo apt install ngrok
- Run the following command to add your authtoken to the default
ngrok.yml
configuration file.
ngrok config add-authtoken <your_auth_token>
- For a simple example, start the apache service
systemctl start apache2
- Go to the directory where the index files are presented and edit
index.html
file
cd /var/www/html
Remove the whole lines and added these lines:
<html>
<body>
<center>
<h1>Localhost Accessible</h1>
</center>
</body>
</html>
- Make your website accessible
ngrok http http://localhost:80