Running a home webserver on ADSL

For this i’m assuming you have Microsoft Windows installed and are connecting via an ADSL firewall/router. I’ll go through the differences between Professional and Server edition. I won’t discuss other web servers which run on Windows such as Apache. I work with Microsoft products so I prefer to stick with MS products at home.

Set up the domain-IP address mapping

Go and buy a domain name, I used www.freeparking.co.uk but there are hundreds of options around.

Find out your external IP address by visiting www.whatsmyip.com. I’m assuming you have a fixed IP address (my ISP – www.eclipse.net.uk give you this as a no cost option), if you don’t have one then you’ll need to use www.dyndns.org which sorts this problem. You’ll need to use their FAQ and help.

When someone types in your domain name, e.g. http://www.socialanimal.com it needs to translate to an IP address (82.152.42.64). This translation is performed by a nameserver. You need to setup your domain so that this translation occurs. This will vary depending on who you bought your domain name from, but look for a DNS manager or equivalent. You need to enter YOUR IP address against the domain name. Replication of this information around the global internet can take anywhere from 0-48hours.

Setup the firewall

So now if someone types your domain name into their web browser it will find your router, but your router should by default ignore the request. (That’s the point of a firewall after all!).

Find out your internal IP address. This is the IP address used on your internal network. Start, Run, ipconfig. There should be a number alongside “IP Address”, we’ll be using that.

You need to open a port to allow the web browser to get to your web server. Port 80 is needed for normal web services. From your PC you need to connect to your router administration page. This is probably using a web browser, try http://192.168.0.1 or http://10.0.0.138

From here you’ll need to consult your router manual. You are trying to add the HTTP service to allow WAN clients connect to a LAN machine. This may also be known as NAT.

Setup the website

Now if someone types in your domain name they will find your router, and it will forward the request onto your web server. You now to configure the webserver to respond to the request.

Start, Settings, Control Panel, Administrative Tools, Internet Services Manager.

Right click on websites, and add a new website. Give it a descriptive name. Enter the domain name as the “Host Header” and choose the folder where you store your website. Hit okay.

Finished

That’s it, everything should be working fine now. You have a domain name, pointing at your IP address. Your router will respond to requests and send them to your web server. Your web server will respond to the request by serving back the default.htm page in the configured folder.

For each additional website you want to add, you only need to buy a domain name, and configure a website on your machine.

Extra

On Windows 2000 Professional you can only host a single website. This means you won’t need to perform the “setup your website” step above.

You won’t be able to access your website using its name from inside your network. To resolve this, edit the c:winntwindowssystem32driversetchosts file and add

127.0.0.1 http://www.DOMAINNAME.com

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s