Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have apache2 installed and have subscribed to no-ip (similar to dyndns) to get a static IP. When I enter the IP they have provided,it takes me to the DSL router page of my ISP as it should. My question is how do I redirect it to my var/www folder so that my PC in converted to a web server. Thanks!

share|improve this question
    
possible duplicate: Making home based web server –  Steve Rathbone Jun 16 '12 at 13:52

2 Answers 2

up vote 5 down vote accepted

You should configure NAT on your router and forward port 80 (and/or 443) to the 'internal' IP. How depends on your router.

On a side note I would disallow access to your router configuration by external IP addresses (i.e., you router configuration page should not be visible from the outside)

share|improve this answer
3  
Off topic here, but I tend to disable the ability to administer the router wirelessly as well. –  Melikoth Nov 23 '11 at 15:24
    
@Melikoth Great tip. –  iglvzx Nov 23 '11 at 16:19
    
What exactly is meant by internal IP? The IP of localhost(127.0.0.1) ? –  amal antony Nov 23 '11 at 17:40
2  
DMZ is a bad option in of itself... Your public IP (assigned by your ISP) will get redirected to your server. You should never DMZ unless you want your computer hacked. Only open ports that you purposely will use. –  WernerCD Nov 23 '11 at 18:30
2  
Presumably, the only thing you want redirected is port 80. Your router should have the option to redirect requests on port 80 to "192.168.2.3". "2.3" should have the firewall tuned to let port 80 in (hopefully you have a firewall). Apache should be listening to port 80. Add 443 if you want to get HTTPS working. –  WernerCD Nov 23 '11 at 18:31

I am assuming your apache setup is working. Now you need to forward port 80/443 from your dsl router to you system's internal ip address. So when router received request on port 80/443 it will forward it to your server.

Read documentation of you router on how to do port forwarding.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.