How to host a website on any computer

Introduction | Things you will need | How to do it | Specs of this machine | Disclaimer | Contact | Summary | Digg effect

Google
Web This site

Download entire page as PDF

1. Introduction

Okay, so my neighbor was moving out, and she wanted to sell some stuff. I went there for some furniture, and I noticed an ancient-looking desktop lying around. I enquired, and she said "it's a very old computer - I don't think it's capable of doing anything anymore. So I'll trash it." I believed I could make it work, so I asked for it. She happily handed over the machine to me, for free!

Now I had this lovely old legacy machine! It's an Acer Aspire, manufactured around the year 1997 (about nine years old now).

Stooge!

It came preloaded with windows 98 Second Edition. I erased windows 98 and installed Puppy Linux on it. I wasn't able to configure the built-in httpd webserver on puppy though. So I replaced it with Damn Small Linux, which "hanged" my machine once. So I finally went back to my old friend Ubuntu, but in server mode this time. Now I operate this machine only by passing few commands on a black screen. No GUI, no role for mouse and clicks.

Many people laughed at me when I expressed my desire to host websites from this old desktop. Not even a single person agreed that this old machine can be put to good use.

And the result is this page! This page is being hosted from the same old desktop machine that you see in the pic above, and it confirms that even ancient computers are capable of hosting websites!

I'm so amazed myself, and wouldn't like it at all if such legacy machines are thrown away just because they can't handle the heavy operating systems of current times. So I'm sharing my method of hosting website on such legacy computers.

This website intends to enable anyone with a computer and an average IQ to host websites from it.

2. Things you will need

Tips:

3. How to do it

A. Preparation and preliminary testing of the machine
B. Hardware needs
C. Loading an operating system
D. Installing the web server application
E. Configuring Apache for a basic website
F. Setting up your website on Apache
G. Starting Apache
H. Testing Apache
I. Registering an address on the internet for your site
J. Testing & advertising

A. Preparation of the machine

First, make sure the computer can be powered on. To do this, attach the mouse, keyboard and monitor to the back of the computer. Now plug in the power supply for the CPU as well as the monitor and switch both on. There should be a green LED light somewhere in the front of CPU that should light up. Also, the monitor LED should turn green and you should see something happening on the monitor.

Tips:

PS2 Connector              USB connector

   PS/2 connector                          USB connector

B. Hardware needs

The computer may be lacking a CDROM drive, a USB or even an ethernet card. We might do away with USB, but we shall need an ethernet card (unless you plan to use dialup modem only) and a CDROM drive for sure. A CDROM drive will be used to load data and OS on this computer. The ethernet card will connect this machine to the internet in order to be able to host the website. Regarding USB, all USB devices may not work well with windows 95/98, so you probably won't invest money in buying a PCI USB card. However, if you intend to install Linux on this machine, you can go ahead with buying a supported PCI USB card.

Tips:

C. Loading an operating system (OS)

Once you are able to get both the CPU and monitor working, and the machine boots up, you will most likely see either windows 98 or windows 95 preinstalled. I strongly suggest you try one of the lighter linuxes (puppy, damn small, feather or others) if you have some experience with Linux. If you do not have linux experience, and want to do things the "easy" way, then we shall use windows only.

Here you have two choices: Either to install a fresh OS, or to keep the existing OS.

(a) Installing fresh OS

Reboot the computer and enter it's BIOS to set first boot device as CDROM. Then use the bootable windows or linux CD to install the OS. If you can't get into BIOS, look at the tips below.

(b) Keeping the existing OS

The computer may have come loaded with many applications and files, and we should get rid of many of them to give it a fresh start. You can probably do several things on the existing machine to make it more "fresh". Some of the things you can do are:

D. Installing the web server application

Now that you have set up the operating system and the drivers, let's install the web server application.

The most popular program to host websites is called Apache. It is an open source project at sourceforge, originally made for unix-like operating systems, but later made available for windows too. You can download Apache from this page.

In linux, apache installation is simple. You should simply fire up your package manager (apt-get, dpkg, synaptic, YaST or whatever) and search for apache and install it from there. However, the installation directory may differ according to the distro you are using. Check your distro documentation, wiki or forums for this information. Further, components of apache may be installed in different directories (e.g. binaries in /usr/bin directory and HTML documents containing directory in /var/www). Search on forums of your linux distro and you'll find answers there.

If you are on windows, look for Win32 Binary on that page and download the .msi or .exe file for windows. Once you have downloaded that file, you should double click the downloaded file's icon to start the installation. Installation is fairly simple. If you do not understand something during the installation of Apache on windows, just keep pressing "next" button and you'll be absolutely fine! During the installation, be sure to note the location where you are installing Apache. The default installation goes to "c:\program files\Apache group\Apache2\", and program groups are made in your windows start menu.

E. Configuring Apache for a basic website

Configuring Apache is actually very easy at the basic level. If all you want to do is to host a single, simple website, you don't need to configure it at all! The default installation of Apache is 100% functional without needing any tweaking whatsoever! In windows, the web server directory is located in "htdocs" folder in Apache install folder. In Linux, it'll most likely be /var/www OR the /~/httpd directory. Whoever opens your website by its domain address (e.g. www.example.org) will see the index.html page first. Apache comes with an example page in different languages. You can cut and paste all these pages in some other directory because you might want to read them sometime later.

You can check out the windows program menu for Apache - there are several useful tools out there (e.g. server monitor, configuration files and help). Linux users can find the documentation in man pages, and again on forums, wiki etc.

F. Setting up your website on Apache

For a simple website you made using your HTML editor, just place all your files (with index.html page) in the htdocs folder in windows (/var/www directory for Ubuntu linux). For setting up additional server technologies like php and perl, please consult Apache documentation.

G. Starting Apache

In Windows, click start button, go to programs menu, point to Apache group --> Control Apache Server --> Start Apache in Console. To start Apache everytime your computer boots up, you can add a shortcut to apache in your startup folder. To do this, right click on "Start apache in Console" in windows start menu, click copy. Then point to "startup" in windows start menu, right click on "startup" and click paste. When you do this, Apache will start every time your computer starts.

In Linux, simply type apache2 in your terminal and press enter. If that doesn't work, try typing apache and press enter. More information can be found at your linux distro forums, including how to make apache open at system startup.

H. Testing Apache

Open this link: http://localhost/ in your browser. You should see the web page you made in Apache. If you dont' see this page, check if there is an index.html or index.htm file in "htdocs" folder in Apache installation folder under "program files" (or /var/www directory in linux) . If the files exist, check if Apache is running (visible in windows taskbar with MS DOS icon). Also check apache configuration files - it's unlikely they're messed up in the default install. If you're sure Apache is configured correctly, check your firewall settings - you must allow access to and from local network.

Tip: If Apache is running and you're sure your file is in the htdocs folder, check httpd.conf or apache2.conf file in the apache installation directory and look for which directory is defined as the HTTP directory. Also check the firewall configuration.

I. Registering an address on the internet for your site

Once you can see your site on your computer, you should plan to host it to the world through internet. To do this, you will need an internet address where people can find your site. You can buy a domain from godaddy, or yahoo small business. Or you can get one for free from dyndns or no-ip. In the paid domains approach, you should call the customer care to guide you about binding your IP address to the domain name. In the free services, you can find a link "add dynamic dns" somewhere in the page, and they will automatically detect your IP and bind it to an internet address of your choice. (Note that free .tk domains can only redirect your site to an already existing site). You will have to create an account on the free services. In case you're using an internet service with dynamic IP addressing (most likely if you're a home user), your IP will change every time you reset your modem or restart your computer. In such a case, check if the free service provider has a software that can automatically update your IP. no-ip has one.

J. Testing & advertising

You must test your newly functional website with a friend who is sitting at a remote location. For example, I called my friends in Maryland, Texas and New Delhi to do the testing for me. They all could access my website without troubles - so I then sent the link to many of my friends to show off my new stuff (this page, actually)!!!

4. Specs of this machine

Make: Acer Aspire (1997)
Intel Pentium 166 MHz
72MB SIMM RAM
1GB Fujitsu Hard Drive
8x CD-ROM drive
Floppy Drive
Ethernet Card - D-Link DFE 530TX+ (added later)
Startech 2-port PCI USB card (added later)
64kBps upload speed DSL internet

It also had a 32-bit sound card (SoundBlaster AWE 64) and some Modem with motorola chip - I have taken off both these to free up two PCI slots for the ethernet and USB cards.

Ubuntu Dapper Drake LTS server edition
Apache2
OpenSSH for remote file management
Site made using Nano text editor
Site edited using Dreamweaver for Mac
This machine is 100% Micro$oft free!

Powered by Ubuntu     Apache HTTP server     Adobe Dreamweaver   Edited on a MacOpenSSH   100% Micro$oft Free!

5. Warnings & disclaimers

6. Contact me

Anil the "Robo"

anil_robo AT yahoo DOT com

My other websites:

http://anil-kumar.net (incomplete - hosted on paid server)
http://nixtechnica.blogspot.com (my blog)
http://nutrition.myftp.org (partially complete - hosted on the same server)
http://geocities.com/anil_robo (outdated - hosted on free yahoo server)

7. The Digg Effect

This site was posted by a fan at Digg.com recently, and experienced a heavy traffic. It survived the onslaught, but was crawling painfully for eight hours. It could have done better if

Apache and Ubuntu survived the digg effect, and the site remains up. I had set up a mirror earlier... and it proved handy in these times.

Thank you all for digging/undigging the story!


Page last modified: March 27, 2007