As with most types of server, there are several Web servers available for Linux. These servers range from exotic and specialized programs to generalist tools. Some programs are small and support just a limited set of options; others are large packages and are loaded with features. Some of the more noteworthy Linux Web server options include the following:
Apache ” This Web server ships with all major Linux distributions, and is the package that's installed by default when you ask for a Web server during system installation. According to Netcraft (http://www. netcraft .com), 65% of the Web's active sites used Apache in March of 2002. For these reasons, this chapter focuses on Apache. This server is quite full-featured and supports the usual set of advanced options, such as CGI scripts and SSL security. The main Apache Web site is http://httpd.apache.org.
Roxen ” This is a full-featured Web server comparable to Apache in many ways. It features a Web-based configuration interface that may make it appealing to some new administrators. You can read more about it at http://www.roxen.com/products/ webserver /.
thttpd ” This server is much smaller than Apache ( roughly 50KB in size, compared to 300KB for Apache, both figures dependent upon compilation options). It's intended to be quick and efficient. Despite its small size , it supports CGI scripts, but not SSL security. You can read more about it at http://www.acme.com/software/thttpd/thttpd.html.
Zeus ” Most Linux Web servers are open source, but Zeus is an exception; it's a commercial product that sells for $1,700. The Zeus Web site (http://www.zeus.co.uk/products/zws/) claims that Zeus scales better than most Web servers to handle very high server loads.
Kernel-based Web servers ” An entire class of Web server has sprung up that relies upon specialized Linux kernel features to handle some of the Web serving. The idea is that the bulk of the job of serving Web pages involves taking disk files and sending them out a network port. This is a simple enough task that the kernel can do it with much greater efficiency than an external program, so various kernel-based Web servers have been developed to do the job. The upcoming section, "Configuring kHTTPd," discusses this approach in more detail.
Non-traditional servers ” Some products use HTTP to provide functions that are more specialized than those handled by traditional Web servers. For instance, the remote administration tools covered in Chapter 16, Maintaining a System from a Distance, are in some sense Web servers. These products typically run on ports other than the traditional Web server's port 80, but they can be accessed using Web browsers. This chapter doesn't cover such servers.
If you have some particularly exotic requirements, you may be able to find a Web server to fit the bill; people have written Web servers for various specialized or just plain strange needs. Doing a Web search may turn up some useful leads.
As a general rule, Apache is a good choice for a Web server because of its popularity and the fact that it ships with all major Linux distributions. Small sites, or those concerned with resource use, might want to look into a slimmer Web server, such as thttpd . If you simply want to run a low- traffic site that doesn't use Apache's more advanced features, such an approach might be reasonable if the slimmer server is easy to install, configure, and use. Because Apache is so common, though, it's usually the easier choice, despite being far more capable than you might need.
Extremely high-performance sites might benefit from kernel Web server enhancements, such as those provided by kHTTPd. Using such a server, you can serve more requests on a single computer, or use a computer with weaker hardware than you might otherwise require. Similarly, even user -space servers such as thttpd and Zeus might be able to squeeze more performance out of your hardware. In many cases, though, the bottleneck in Web server performance is the Internet connection, not the Web server computer or software. More efficient software won't help if your site is too popular for your Internet connection. If that's the case, you'll need to reduce the bandwidth requirements of your Web sites (say, by reducing graphics), upgrade your Internet connection, or move your site to a Web hosting or co-location service with better connectivity than you have locally.
If you opt to use a Web server other than Apache, this chapter may be useful in that some of the capabilities of your server may be similar to those of Apache, and the configuration features may be similar in a broad sense. The specifics of how you handle a configuration file will be dissimilar, however.