Hosting a Website: The Server

A server, in the basic sense, is a computer which runs a program (also called a server or server application) that provides a service to other computers. This could include an HTTP (or web) server, a DNS name server, a mail server, a VNC server, an SSH server, an FTP server — and many, many others. A server can run any number of server applications, provided it has the resources to run them all simultaneously. Each program binds and listens to a distinct port on the computer running it, usually the standard port for whatever service it is providing (for example, 22 for SSH, or 80 for HTTP). When another computer wants to use that service, it sends a message to the server, on the appropriate port, to request service from the program. The program then sends a response, establishing a connection between the two computers; the service is rendered, and the connection is severed.

To host your own website, you need a computer with an HTTP server, and a decent (not dialup) always-on internet connection. A spare computer (used as a “dedicated server”) with, say, a 333MHz processor and 256MB memory is plenty sufficient to serve a low-traffic website, especially if you put an operating system with low resource requirements on it. If you have a “modern” home computer (usually 1GHz+ and 512MB+), you could even install the web server on that machine, provided you always leave the machine running. Hard drive requirements are very small as well; if you are using a dedicated server, you could use a 10GB hard drive and have more than enough space for your website.

Once you have a machine designated as your server, you need to set it up. If you have a dedicated server, and you plan on using the existing operating system, make sure that no unnecessary programs start running at startup. Once the operating system is prepped (or installed, as the case may be; your home computer can most likely be run normally), you need to install the web server.

In terms of web servers, Apache is the most widely used. And it’s free. And it’s bundled with Ubuntu server edition, should you choose to add it during installation. These reasons and more make Apache a good web server to start with (and, ultimately, stick with). Once you have Apache installed, it needs to be setup to know what files to serve as what website. Check out the Apache Virtual Host documentation for details on setting up individual websites.