To access localhost from anywhere on Internet we will use ngrok.
ngrok is a reverse proxy that creates a secure tunnel from a public endpoint to a locally running web service.
Ngrok is used for Temporarily sharing a website that is only running on your development machine
How to download and use ngrok?
Follow these steps to download and use ngrok.
1.Go to https://ngrok.com/
Click on sigup link.
Enter your name, email and password to complete the registration process.
After successful registration you can see ngrok dashboard like below.
2.Click on download for windows.
3.Once download is completed, extract zip file.
After unzip click on ngrok application file.
A command line interface opens like below.
4.Go to control panel of XAMPP Server and Start Apache.
5.Go to command line interface of ngrok and type ngrok http 80.
This command creates a secure tunnel to your localhost.
80 is the port number on which local host is running.
After pressing enter a secure tunnel is created.
6. Just copy the link in-front of forwarding and paste in web browser.
Now just share the link with specified folder path to anyone and they can access your localhost from anywhere.
Comments