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 HyperText Transfer Protocol (HTTP) 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 Common Gateway Interface (CGI) script or custom Application Programming Interface (API) 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 the National Center for Supercomputing Applications (NCSA). At the time, HTTPd was the first and only Web 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 new project from this code base called Apache. Since then, what is now the Apache Software Foundation ( www.apache.org ) has largely rewritten the code and created a stable, multiplatform Web server daemon. More than two dozen related projects are also sponsored by the Apache Software Foundation. Those projects include Mod_perl (to create dynamic Web sites with the Perl language), Jakarta (to provide server-side Java content), DB (to create and maintain commercial-quality database solutions), and spamassassin (to identify and deal with junk e-mail).

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 Secure Sockets Layer (SSL) 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. This includes the ability to have different users controlling script execution (to limit the vulnerability of a whole Web server if a single script is compromised).

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

Apache is not the only Web server available for Fedora and other Red Hat Linux systems, but it is the one most commonly used with Linux, and is the most popular server used on the Internet according to recent Netcraft surveys ( http://news.netcraft.com/archives/web_server_survey.html ). In addition to Apache, Fedora and RHEL come 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 Fedora and Red Hat Linux distributions. 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 dynamic content that is not supported in TUX's kernel drivers (such as various scripting languages that TUX doesn't know about).

Note 

If you are interested in TUX, I suggest you subscribe to the TUX mailing list for the latest information on its availability. Go to www.redhat.com/mailman/listinfo and subscribe to tux-list@redhat.com . Also refer to the TUX manual ( www.redhat.com/docs/manuals/tux/TUX-2.0-Manual/intro.html ).

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 81, 8080 or some other port.) The TUX service launches from the /etc/init.d/tux init 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 multiple domains to be supported on one Web server (referred to as virtual hosting), 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 Fedora and RHEL. Then refer to the documentation starting with /usr/share/doc/tux-*/tux/index.html , using a browser.

Other Web Servers Available for Fedora and RHEL

Some other Web servers that can run on Fedora and other Red Hat Linux distributions are described in the following list, with URLs that provide more detailed information.

  • 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 covered under the GPL. Zope is not included with Fedora or RHEL, but can be obtained from any Fedora Extras software respository or from the Zope development site ( zope. sourceforge .net ). Zope is python-based.

  • AOLserver 4.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.13 - 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. Boa is also popular for use on embedded systems. It can be downloaded from www.boa.org .

  • CERN (W3C) Jigsaw 2.2.5 - 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.12.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 .




Fedora 6 and Red Hat Enterprise Linux Bible
Fedora 6 and Red Hat Enterprise Linux Bible
ISBN: 047008278X
EAN: 2147483647
Year: 2007
Pages: 279

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net