Home » Questions » Computers [ Ask a new question ]

How can I make my home PC a web server?

How can I make my home PC a web server?

I am running Apache Tomcat on my PC. My PC is connected to a router in my house and the router is connected to my ISP. Now I want to run a server on my PC so that my friend can view my site hosted on my PC. If I go to the site whatismyip.com I know that my IP address is xx.xx.xx.xx. This is the IP of my router I guess. If I type http://xx.xx.xx.xx in my browser then my router asks for a username and password. This means that my friend can connect to my router. How can I allow them to see the site hosted on Tomcat running on my PC?

Asked by: Guest | Views: 241
Total answers/comments: 3
bert [Entry]

"You need to port forward HTTP (tcp/80) to your pc (192.162.1.2). Each router is slightly different, so you'll need to find some instructions for your specific model.

If your router supports UPnP, then (They're screen scraping - not using UPnP) you could also do it automagically as needed (better security) for $$."
bert [Entry]

"You will need to set up ""port forwarding"" on the router of port 80 (http) to your PC and also I recommend setting up ""static DHCP"" so that the router always assigns the same IP to your PC when it boots.

Note that you are exposing your PC to the world of hackers when you do this. Make sure you have a current version of apache/tomcat installed and that you apply updates regularly.

If your router supports it you may want to set up ""dynamic DNS"" to give your machine a permanent name on the internet (instead of a sometimes changing IP #.) Check out dyndns.com and look at their free dynamic DNS options."
bert [Entry]

Static IP is a must...If u have Dynamic IP, it keeps on changing and u need to intimate to your friend about the new IP