See Jack and Jill Run Their Own Server: A Primer
Chantal Bertrand

There are a few good reasons why you would want to host your website on your own server. First of all, there's no reason why you can't. It's relatively inexpensive. There are a few technical hurdles but if you are patient and have a computer lying around that isn't much good for anything then you may want to try your hand at it and learn some nifty things. Secondly, if you are paying for a high speed connection anyway you may as well save yourself the additional charge an ISP (Internet Service Provider, ie. Sympatico/Rogers) is going to hit you with for hosting your website. For example a connection with a small ISP like TekSavvy (for those in its coverage area) gives you a video-streaming-quality 15gig connection for $60/month -- $20 more than you would pay for a low-speed 5gig DSL Sympatico connection. Hosting your own server allows you complete freedom. It allows you to choose your own content management system: Zope, MySQL, PHP-NUKE, Postnuke, or Slashcode (I use Squishdot because I find its format perfect for my personal website). This means that the size of your website or number of pages is not limited by the policy of your ISP (Internet Service Provider). You determine how big your website is going to be and you can grow it appropriately, all dependent only on the capacity of your machine. And finally, you can also host other people's websites.

In this primer I will be talking about running your webserver on a Linux box. I don't do other operating systems and I really do not recommend anything but Linux. Windows server software costs money, is less stable, and is more vulnerable to hackers. But if you have Windows or Mac don't panic because the configuration I recommend will either allow you to keep your present boxes and network them with a Linux server (gateway) so you can share your internet connection with all your computers; or your server will be a stand alone server for your website. This article, however, is intended only for getting you pointed in the right direction. At some point you will have to consult other websites either to download software or supplement your knowledge. First you will learn why I recommend a Linux server, and a blurb on this operating system. Next I will talk about why your server has to be either a stand alone box or at the very least a gateway, a computer networked to your other computers because it is not a good idea at all to have a varied use computer where you have your word documents or where you game. By that point you will be totally convinced that you need and love Linux so I will get into the nit and gritty techno stuff which I will keep in plain English as much as is geekily possible. And if you get lost I have provided a glossary of terms along with some short answers to questions frequently asked. The technical stuff I will be covering goes like this: configuring your server as a gateway, what is apache, installing Linux, choosing your internet connection, the difference between static and dynamic addressing, minimum hardware requirements, how having video changes those costs. But to begin with a word about why I recommend Linux above other operating systems.

WHY LINUX RULES

Linux is cheap, stable, and secure. Where Windows is a personal computer operating system, Linux is a network operating system, in fact, Linux is a flavor of Unix which is the network operating system upon which the Internet is built. That is why Linux is said to be 'native' to the Internet and is the platform of choice for most of the Internet and it far outnumbers the other operating systems. Along with being stable, cheap, and secure, it's where the action is happening -- this is rather significant in terms of technology because new upgrades of server software come out first on Linux.

For those of you who are new to Linux it is unlike Windows or Mac in the sense that it is a non-proprietary operating system. Windows or Mac make it very difficult or impossible to look under the hood and certainly to modify the operating system. That's why we call them proprietary operating systems. The code that they are based on are closed to the user and the software they use is, generally speaking, also closed. Linux on the other hand is what is known as 'open source' operating system which runs primarily on software that you can adapt the source code to your liking, if you know how. Linux is often considered an excellent, low-cost alternative to other more expensive operating systems. Due to the very nature of Linux's functionality and availability, it has become quite popular worldwide and a vast number of software programmers have taken Linux's source code and adapted it to meet their individual needs. At this time, there are dozens of ongoing projects for porting (making available) Linux to various hardware configurations and purposes.

But for those of you who have Windows or Mac you can network your Linux server to your existing boxes. Your server, in fact, should never act in any capacity other than as a server because it is a bad idea to have user files on a web server. This is because your personal data, word documents, games and so on are open to viruses or other nasty so-called "exploits". Also in terms of stability the more software you have on your computer the more that can go wrong. So the simpler your server is the more stable and secure. This is true for when it comes to deciding what services you will offer on your server. Services are something a computer offers like http, (web pages) ftp (file transfer protocol), ssh (secure shell for remote administration) or real audio. I would say that all you need is http and ssh, the latter helping you to have your really geeky friends fix problems from a remote location like their house. Generally speaking, the more software or services you offer the more cracker friendly your box is. And it gets worse. Crackers will use your server to launch exploits such as DOS (Denial of Service) attacks and using your site to cover their tracks. From the obvious hassle this creates it's even more of a drag because your reputation can get dragged through the ether mud. So try to keep it simple and think about the purpose of your website and offer only those services that achieve those goals.

FIRING YOUR WALLS, GATING YOUR WAYS

Having a server networked to one or more other computers is a very common configuration known as a gateway firewall. A gateway computer is just that: a computer which acts as a gateway for other computers. A firewall is a computer that attempts to stop unauthorized access into a network. There are many excellent programs available which will configure your gateway. I recommend Shorewall. Go to www.shorewall.net if you want to download the firewall rules. It's not easy to install and you may need help. Just pay attention to their help files and how to get started information. You may, in fact, set up your Shorewall firewall but it takes a fair amount of patience but you are certainly going to learn a lot about networking computers. If you decide to have a stand alone server, a box that is not a gateway, then the firewall rules provided with your favorite distro are certainly adequate. These days, the default firewalls provided have wizards to help you configure them. If your webserver is a gateway then I recommend a more robust firewall like Shorewall.

FILLING YOUR BOX WITH LINUX

Installing Linux on the other hand is quite simple, very similar to installing Windows. Most Linux distros (distributions: yes, Linux comes in many different flavours) have a nice gui (graphical user interface, as opposed to >command line) installer, those windows that come up that allow you to point and click on icons to open and close programs. You can either download a version from a website or go to a computer store for the latest boxed set of Redhat, Mandrake, Suse, or Debian. I have used them all and am currently using Redhat. As far as recommending one or the other it really depends on your needs and tastes so in way of explanation I will say only that Redhat and Mandrake are very user friendly and Debian is for the computer enthusiast. Go to Linux.org for more information on Linux distributions. Also all of these distros will have Apache, the best web server software available and by far the most used. The average user is going to have a relatively easy time to get to the point where s/he can create the website. Note however, that you are most likely going to need someone knowledgeable to put your website up on the Internet and lock it up (firewall). But don't worry about that. Just get Linux up and running.

Whether you buy a distro of Linux, download it from a website, or get it from a friend (which is totally legal, unlike the bad guys at Microsoft who make it a crime to share software) the costs of running your own server are basically the costs of the computer and the pipe (in other words the Internet connection). At one point at our home we had a server running on a celeron 300 megahertz chip with 64 megs of ram and a 4 gig hard drive. On peak days the machine had 5000 visits, served over 10,000 HTML pages, 40,000 images and acted as our home gateway. While the server was not busy like this every day, and on those peak days the network did slow down, it does show you that you do not need a fire breather to run a simple website without video. The minimum hardware I would recommend is any pentium II or AMD K 6 300 megahertz or better with 64 to 128 megabytes of ram (the more ram the better and if you are streaming video then it is not an option: you are going to need a minimum of 512 meg of ram) and a 2 or 3 gig hard drive. This is all to say that you really do not need a hot rod or super deluxe toaster for a machine. This is not however true about the type of connection you are going to need.

CONNECTION CONSIDERATIONS

Understanding high speed connection or bandwidth is essential to determining what type of connection you are going to need. At minimum you are going to need a high speed connection. There are many types of high speed connections. There are DSL (digital subscriber line), ADSL (asynchronous digital subscriber line), SDSL (Synchronous Digital Subscriber Line), cable, T1, T3 and others to boot. You can pretty much ignore the last two because they are fabulously expensive and if you can afford it we really shouldn't be talking. My website had a DSL connection which was more than adequate and I was able to upload fairly large image files my daughter was carving with her fan art. Rogers and Sympatico won't officially allow you to run servers, and neither have reasonably priced static ip's, but broadbandreports.com is a good place to go to find a better ISP in your area. When you are ready to configure your server to ASDL (Sympatico) or cable go to their websites for instructions. If you are having problems getting answers you can always post a question to a local LUG (Linux User Group). LUG sites are great places to get answers to your questions and often just reading their FAQ 's will do the trick.

Having video on your server changes your pipe costs because you will probably need a DSL connection with -3.5M/800K- (3.5 megs download -- how fast you get data, 800K upload -- how fast you can supply data to visitors). The bottom line ADSL connection for example is 1.2M/128K. While this is enough to supply HTML to thousands of 'hits' it is not enough to supply video to more than a couple of users at a time. More than that and your server is going to be swamped. You are going to need a computer with at least 128M of ram -- 256m is what I have. Remember, it is more important to have more ram than a faster CPU, so if you are going to splurge, ram is definitely the way to go.

IP FREELY? CALL FOR...?

Now that you are at the point where you have installed Linux on your box, you're networked, and you have your favorite web management program running, you need to decide which type of address you are going to sign up for. While it is important to have a high speed connection you do have a little more choice between getting a static or dynamic IP address. A server's IP address is really like your telephone number. Remember the days of telephone operators? When an operator received a signal over telephone wires and the light lit up, s/he literally connected that signal to a phone line and bingo your telephone rang and someone picked up. It pretty much works in the same way in computer land. Instead of dialing a telephone number on a phone someone types in a url (user resource locater) or name of the website and, in the new terrain that is the Internet, the operator, or more recently the switching station, has been replaced by DNS server. DNS stands for Domain Name Service and it is responsible for translating the name you type in and 'resolving' (or changing) that name into an Internet address or IP address.

There are two types of addresses you can have: static IP or DHCP (dynamic host control protocol) and choosing one or the other really comes down to your needs. If it is really important that people find your site, in other words you are flogging jelly beans and you do not want to lose a potential customer then getting a static IP address is probably the way to go, especially if it is paying off. But if you are goofing around and it is not mission critical then DHCP works very well. So to put it simply -- static IP address is a fixed number, just like your telephone number. DHCP is kind of like having a new postie doing your route everyday. But really, ISPs like ISTOP offer high speed service with a static IP address for less than the price of Sympatico. So shop around before you go with an ISP and see what services they have to offer.

----

Chantal Bertrand lives in Montreal with her honey, her two daughters and her son, and can be reached via email.

----

Further Research

DSL Reports is a good place to find alternatives to the big guys in your area.

Also check out Webmonkey's straight-talking tutorials on backend and video related stuff.