Sign in with
Sign up | Sign in
Your question

Apache Setup

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

I have a Fedora Core 4 machine with Apache (system configured per this tutorial: http://www.howtoforge.net/perfect_setup_fedora_core_4 ). I placed my homepage files in /var/www/html/ and now can access them from my local network as http://192.168.0.150/index.htm 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 192.168.0.150 . 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?

Thanks,
Jo

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:
[code:1:b00bc09380]
192.168.X.X X.X.X.X
|Home machine|<=====>|Router|<=====>|Modem|<==>ISP
[/code:1:b00bc09380]

You know the interior address (192.168.0.150), 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: http://www.whatismyip.org/.

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

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.

Jo
!