How to access locahost through internet

Written By Kapin Raj.S
Host a free public website in your machine

Host your Local website in public at free of cost

Hi guys welcome and back again with a excellent concept, where you can host your own website in your local machine without spending amount for it. Here I’m gonna make a sample website up and running in my local machine and hosting to the public network.

Mostly probably everyone will like forward to start website to explore their own services or resources, etc,. So here, let me show you the cool techniques for you.

Let Do it!

Tools used in this:- Ngrok (to get a public URL for your Local apps)

 

Step 1: Create an account in Ngrok

Need to create a account in Ngrok website to avail services from ngrok. Then navigate to the download tab and get a setup corresponding to your OS. Run the ngrok.exe as administrator on your machine. And add your token to it.

Once login, you get a token like below, execute it in the command prompt.

Host a Free Public Website in your Local machine

D:\Ngrok\ngrok-stable-windows-amd64> ngrok authtoken 5hz6tcPbuwTZCkV4WjK_5hwesLFCFwkQKLkXZoM

 

Step 2: Create a website in Windows IIS

Before getting into the website creation. Need to enable web service in windows which is displayed below. Go to Control Panel\Program and Features\Turn windows features ON or OFF and check mark to Internet Information Services (IIS).  Or execute run command – optionalfeaturesHost a free public website in your machineIn order to create a website get into this following location Control Panel\All Control Panel Items\Administrative Tools\Internet Information Services (IIS) Manager. An other way around, you can get through run cmd.

Run Command (Win+R) –  %windir%\system32\inetsrv\InetMgr.exe

Host a free public website in your machine

Now, you have to right click on the sites and “Add Website” and fill those information. And select your local IP in IP address, once you run ngrok will create a path C:\inetpub\wwwroot\

In that directory you can create a own folder and add the path as shown below.

Host a free public website in your machine

Click OK, here I’m gonna show a basic HTML page. Open notepad and paste the following HTML code

<html>

<title>Xploiting</title>

<body><h4 style=”text-align: center;”><strong> Hi Guys Welcome to www.xploiting.com </strong></h4></body>

</html>

Save as .html in C:\inetpub\wwwroot\xploiting. Now, access your private IP in your browser. In my case http://192.168.43.243 is my web address.

Host a free public website in your machine

That’s it, we successfully hosted html page in localhost. This is just a sample, you could develop your own site here in localhost.

 

Step 3: Hosting our local site to public using Ngrok

All you have to do is open ngrok.exe and executethe below

D:\Ngrok\ngrok-stable-windows-amd64> ngrok http 80

You will get a link like – https://26a84226.ngrok.io

Host a free public website in your machine

Finally, just append with the folder name which have been created. In my case below mentioned is my link. And don’t close the ngrok command prompt.

https://26a84226.ngrok.io/xploiting

Host a free public website in your machine

That’s it guys. Its got accessed in public URL. Now you can access your local website all over the public network.

Thanks for reading our blog.

Comment your queries and mention any topics need to posted.

 

Best Regards,

Kapin Raj.S

0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

*

*
*