Setting up your own web server is a great way to learn about web hosting and gives you total control over your website and how everything works on it. Whilst Windows XP is not an ideal hosting platform for a very high traffic site, it still has the functionality to allow you to host a decent sized site of your own.

What are the advantages of hosting your own site?

  • 1: Complete control of security, add-ons and logs.
  • 2: You dont have to share your hosting with anyone else.
  • 3: Easy access to files that are stored on your web server.
  • 4: Total control of availability (if you pay for hosting and your site is down then you have to wait for a response from support!)

Like I said before, Windows XP is not an ideal platform for a big size site, and if you really wanted to setup your own web hosting then Id recommend using Windows Server or even Linux, however XP is a great starting point and you can learn a lot from it.

So firstly were going to need web hosting software. In this guide were going to use IIS which comes with Windows XP Pro, there is other software available (the most popular being Apache) but were going to use IIS for this. Lets first check if you have IIS installed, go to control panel > administrative tools, look for Internet Information Services. If you dont have it then go to add remove programs > windows components, choose Internet information services and click details:

install iis

Make sure Internet Information Services Snap-in is ticked, aswell as World Wide Web Service. You can also tick the SMTP and FTP Services but we wont be covering those in this guide. (You may need the windows XP cd for this bit!)

Ok so now that we have IIS installed lets open it up from Admin tools. You should be presented with the following screen:

iis main

By default you will already have a site, unless your going to run multiple sites with different identities then we can use this default site as it is. Right click it and choose rename to give it a more meaningful name. Now we need to start configuring it, the first thing we want to do is choose where our web page(s) are going to be kept. By default Windows will have created a folder on your C drive called inetpub, within that folder you will have one called wwwroot. You can leave this folder as it is or if you want to change where your web files will be served from then right click your website and choose properties, then click the ‘home directory’ tab:

iis home directory

Can you see the local path section in the middle? That is where you choose your directory from. Lets take a quick look at the other settings here. At the top we have 3 radio buttons. If our web files were stored on another machine then we would use the ‘share located on another machine’ option. If we simply wanted to use our site as a redirect to another site then we would use the ‘redirection to url’ option.

Application settings are where to choose our security levels. By default we can leave the application name as it is and this isnt really relevant for IIS in Windows XP. If we were using IIS on Windows Server then we might have application pools for multiple sites but this isnt something we need to worry about right now!

The permissions settings are something we need to be careful with, unless your site has any special requirements we shouldnt need to give write access or directory browsing access, these can pose security risks.

At this point we need to add our content to the site, copy over all your web files to the home directory you selected above. Now we can try to access our site, fire up your web browser and go to the address http://10.10.10.10 (Replace this with your ip address!) or http://your-hostname-here (Again, replace with your hostname!)

Hopefully your web site will be visible! By default your web server will return its default page when a user tries to browse to the root of your website. You can change this setting in the ‘Documents’ tab for your web sites properties and then add/remove items from the ‘Enable Document Default’ section.

At this point your site is live within your local area network (providing your firewall allows it!) For external users to access your site you will need to open up port 80 on your router and point it to your local ip address of your web servers machine. At this point you should set your web server to have a static ip address.

There you have it, a very quick and easy way of setting up your own web server! I havent gone into too much detail here but this guide is enough to get your website live and accesible. In my next guide I will talk about setting up your own domain name (eg www.yoursite.com) and making it point your web server and also some advanced settings in IIS.