1

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!

1

2 Answers 2

5

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)

10
  • 3
    Off topic here, but I tend to disable the ability to administer the router wirelessly as well.
    – Melikoth
    Nov 23, 2011 at 15:24
  • @Melikoth Great tip.
    – iglvzx
    Nov 23, 2011 at 16:19
  • What exactly is meant by internal IP? The IP of localhost(127.0.0.1) ? Nov 23, 2011 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, 2011 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, 2011 at 18:31
2

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .