Sign in with
Sign up | Sign in
Your question

Apache Setup

Last response: in Linux/Free BSD
December 15, 2006 1:42:55 AM

I have a Fedora Core 4 machine with Apache (system configured per this tutorial: ). I placed my homepage files in /var/www/html/ and now can access them from my local network as and so forth.

The question is, how can I access these files from outside my network, effectively serving the website on this machine? Can it be done while the server is behind my router? The router is a D-Link DI-524 and I have set the HTTP(TCP 80/80) "Virtual Server" in the router configuration to . Should I use a switch to split the connection from the ISP to my router and the server? Can this serving be done without my registering a domain name?


More about : apache setup

December 15, 2006 10:09:40 PM

Steps to contact your machine from the outside world:

Forward the desired port in the router/gateway/NAT device (sounds like you've done this already)

Find the external address of your machine. Unfortunately, with most ISPs this is dynamic (more about resolutions to this later). Here's a diagram for exactly what I'm talking about:
192.168.X.X X.X.X.X
|Home machine|<=====>|Router|<=====>|Modem|<==>ISP

You know the interior address (, you can find out the external address (that known by the router and the modem, X.X.X.X) by going to the following site:

Once you know the address, you can check by going to the address. Say WhatIsMyIP says it's, you'd open a browser and goto

Now, that address changes but you'd like to always be able to get to the server, you can try out various dynamic DNS services, they provide a client that you run on the server (your machine) that updates the DDNS servers as to what your current external address is, allowing you to have a nice name attached to your machine.

This should be a good start, but be sure to read guides on securing your machine and patching utilities to make sure your server is secure from cracking attempts.
December 16, 2006 9:20:07 PM

Thanks for the reply. Although I had set up forwarding with the Virtual Server, I wasn't aware that my ISP would block port 80, 21... so I had to change the public ports on the server to 5080, 5021... and used DynDNS to hide the ip behind a name.