Introduction to Web Servers

Introduction to Web Servers

The World Wide Web, as it is known today, began as a project of Tim Berners-Lee at the European Center for Particle Physics (CERN). The original goal was to provide one consistent interface for geographically dispersed researchers and scientists who needed access to information in a variety of formats. From this idea came the concept of using one client (the Web browser) to access data (text, images, sounds, video, and binary files) from several types of servers (HTTP, FTP, SMTP, Gopher, NNTP, WAIS, Finger, and streaming-media servers).

The Web server usually has a simpler job: to accept HTTP (HyperText Transfer Protocol) requests and send a response to the client. However, this job can get much more complex (as the server can also), executing functions such as:

  • Performing access control based on file permissions, user name/password pairs, and host name/IP address restrictions.

  • Parsing a document (substituting appropriate values for any conditional fields within the document) before sending it to the client.

  • Spawning a CGI (Common Gateway Interface) script or custom API (Application Program Interface) program to evaluate the contents of a submitted form, presenting a dynamically created document, or accessing a database.

  • Sending a Java applet to the client.

  • Logging any successful accesses, failures, and errors.

The Apache Web server

The Apache Web server was originally based on HTTPd, a free server from NCSA (the National Center for Supercomputing Applications). At the time, HTTPd was the most common server on the Internet. Unfortunately, the development of the server wasn't keeping up with the needs of Webmasters, and several security problems had been discovered. Many Webmasters had been independently applying their own features and fixes to the NCSA source code. In early 1995, a group of these developers pooled their efforts and created "a patchy server," initially just a collection of patches to the HTTPd code. Since then, the Apache Group has largely rewritten the code and created a stable, multiplatform Web server daemon.

Apache is also the base for several other Web servers, most of which use Apache's freely available source code and add improved security features such as SSL (Secure Sockets Layer) for encrypted data transfer or advanced authentication modules.

The main features of the Apache Web server include:

  • The stability and rapid development cycle associated with a large group of cooperative volunteer programmers.

  • Full source code, downloadable at no charge.

  • Ease of configuration using plain-text files.

  • Access-control based on client host name/IP address or user name/password combinations.

  • Support for server-side scripting as well as CGI scripts.

  • A custom API that enables external modules (for example, for extended logging capabilities, improved authentication, caching, connection tracking, and so on) to be utilized by the server daemon.

Apache is not the only Web server available for Red Hat Linux, but it is the one most commonly used with Red Hat Linux, and is the most popular server used on the Internet according to recent Netcraft surveys (www.netcraft.com/survey). In addition to Apache, Red Hat Linux comes with the TUX Web server.

The TUX Web server

The TUX Web server (also referred to as the Red Hat Content Accelerator) is a high-performance, kernel-based Web server that is part of the Red Hat Linux distribution. By operating within the Linux kernel, TUX can very efficiently serve static content (such as images) while integrating with another Web server's daemon to handle content that is not yet supported in TUX's kernel drivers (such as various scripting languages that TUX doesn't know about).

On a computer where it is being used, the TUX server typically takes over the primary Web server port (port 80). (An Apache Web server would listen on 8080 or some other port.) The TUX service launches from the /etc/init.d/tux startup script and runs based on kernel parameters that you set in /proc/net/tux.

At a minimum you need to set the serverport (for TUX), the clientport (for Apache), and the DOCROOT kernel parameters for the location of the Web-server content. That location (typically /var/www/html) must be the same for both the TUX and Apache servers. TUX processes some of the data types that it supports with kernel drivers and others with loadable modules. As more of these modules become available, more data types will be able to run in the kernel, and will not have to be handed off to slower, user-level processes.

Special features in TUX include mass virtual hosting, which allows several virtual hosts to be supported on one Web server, and FTP support, which allows you to configure TUX as an anonymous FTP server. Also, because TUX doesn't start a process for each client, thousands of client connections can be active at one time without excessive demands being made on memory allocation.

For more information on TUX, install the tux package that comes with Red Hat Linux. Then refer to the documentation starting with /usr/share/doc/tux-*/tux/index.html, using a browser.

Other Web servers available for Red Hat Linux

Some other Web servers that can run on Red Hat Linux are described below, with URLs that provide more detailed information.

  • Stronghold 3 — This Apache-based Web server from Red Hat features 128-bit SSL encryption and a digital certificate. According to Netcraft (www.netcraft.com), Stronghold is the top commercial SSL Web server for UNIX systems. For details, see Red Hat's Stronghold page: www.redhat.com/software/apache/stronghold.

  • Zope — In addition to being able to serve Web content, Zope includes features for adding news, membership information, and search capabilities. Originally created by Zope Corporation (www.zope.org), Zope is now available as an open source project (zope.sourceforge.net) covered under the GPL.

  • AOLserver 3.5 — Originally called NaviPress, this server features Web-based administration, access-control, SSL encryption, and SQL database drivers. More information and downloadable source code can be found at aolserver.sourceforge.net.

  • Boa 0.94 — Designed to be fast and simple and not laden with features, Boa requires less system resources than other servers and is ideal for older hardware. It can be downloaded from www.boa.org.

  • CERN (W3C) Jigsaw 2.2 — The latest HTTP/1.1 reference server, written completely in Java and freely available, can be found at www.w3.org/Jigsaw. It features extensive caching, an improved mechanism for executing external programs (although CGI is also supported), and a graphical administration tool.

  • Servertec iServer 1.1 — Written in Java, this relatively small server provides load balancing and fault tolerance in a clustered environment and can be easily coupled with application and database servers. Further details are available at www.servertec.com/products/iws/iws.html.




Part IV: Red Hat Linux Network and Server Setup