How to Host a Website on Your Computer | Enable Port Forwarding on D-Link Router
Articles,  Blog

How to Host a Website on Your Computer | Enable Port Forwarding on D-Link Router

hey guys! Today I’m going to show how to
host a website on your computer without the need of buying any domain name or
using any hosting servers. Now this is just to show how things are done. You
might use this to host your website temporarily maybe to show your friends
or family and get their opinion before you get it hosted by a hosting server.
Now let’s start this. Open your browser and type this is the IP
address for your router or the D-Link router mostly. Then you type the username
and give you admin username admin password and enter. Then you need to open this Advanced tab.
Then on the left side, you can see below the Advanced Wireless, there is Port
Forwarding. Now we need to open port first before we do anything. Click on
add ok drop down and then select a service
click on this. Now scroll down and we need to select this one this web server
HTTP. HTTP uses the port 80 that we need to open. You can see it has automatically
filled in port 80. Now we need to specify the IP address of our computer. Click on
the Wi-Fi signal or the your connection symbol and then click on open Network
and Sharing Center. Now you click on your connection I’m using Wi-Fi so I’m clicking
on Wi-Fi then you go to details and there you can see the IPv4 address
assigned by your router Write it down somewhere or memorize
it. Close this one. Close everything then write the IP
address here and then apply now this opens the port 80. Now we need
to download a server that listens to requests that are coming on port 80. You
can use Apache. I’m using Xampp. Xampp is very easy to use all you need to do is
search for Xampp and then come here you will this is the latest version you can
see 7.1.9. I’m downloading Xampp for Windows if you are
using Linux or OS X you can download Xampp accordingly. Now you can see what Sam
includes in this Apache and everything else the requirements you can see that
Windows Vista 7.. if you are using XP or 2003 you need to download different
version. Let’s just download this. After the download open your download folder
and right-click on the Xampp, run as administrator. Click yes. Ok
Next. Now these are the servers that Xampp is going to install and these are the
programming language. If you are not sure about them just click Next or if you are
sure you are not going to use any of these, if you are not going to use Perl
you can just untick it and then go to next. This is the default
folder for Xampp. Let it stay there and next. Now Xampp will
start installing on your computer. I’m using Xampp because it is very easy to
install and then it’s really very easy to control all the servers at one place.
You can start any of the services or stop it from the control panel of Xampp. If you
like you can download a Apache instead but I’m using
this approach. This is easy to use. Let it just finish installing. Click on finish There is option for English language or
German language. You can choose either one of them. Then this is the control
panel that will open up. We need to start Apache service. So come here and click on
start. Now the Apache server is running at both 80 and 443, just minimize this.
Now you need to copy the website. Let me just cut this from here, open my computer
then C then Xampp directory then this htdocs htdocs open this and then paste the
website here you might want to give a very short or
easy name so that you can.. so that you don’t have to write a long name
just write temp then open your browser new tab and type “my IP”. Now this is your
public IP, all you need to do is copy this IP and open your.. any other device
that is not connected to the same network. You can use a mobile phone or
tablet or anything just open it and maybe use mobile data in it then type
the same IP address. Type http:// // then the
same IP address that we have just copied down
then the name of the website we have written temp, type temp
hit enter and now you can see the website loading you can also notice that my phone is not
connected to the Wi-Fi. I’m using mobile data in it you can see the rest of the website. Just
scroll down and you can see the entire website working as it should on a hosting server yeah everything is good now after you are done, make sure to
delete the port forwarding service to close the port that we have just opened.
Let me show how to do this open your browser again and open the… and open one tab
and type IP address and then come to this port forwarding and then
click then check this box and then delete it. Okay now we have closed the port 80. Now we need
to close the Apache server also. Come here and click on stop and this is done. Now
this is for the security reasons because ports 80 and 443 are very popular and
they can be discovered by attackers very easily also make sure that while your
port is open you do not share your IP address with anyone except the people
you really really trust thanks for watching


Leave a Reply

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