Chapter 16: The Apache Web Server


An Overview of Web Servers

The World Wide Web (WWW or just web) is based on a client/server model. The client runs browser software that allows you to request information on the web and to browse and navigate through it. The information that you request is stored on a machine called a web server. The function of the web server is to provide (serve) web documents and applications to multiple simultaneous browser clients. The term “web server” is also used to describe the software on the “web server” machine that actually handles the requests for information from web browsers. For the purposes of this chapter, when the term, “web server,” is used, it will be in reference to the web server software program, unless otherwise stated.

The most used data transfer protocol that is used between web servers and web browsers is the Hypertext Transfer Protocol (HTTP), which is described in Chapter 10. So in the UNIX world, web server software is commonly known as the httpd or http daemon (see Chapter 11 for a discussion of daemons), which is typically a background process (or a group of processes) governing the HTTP network service. In Chapter 10 we noted that web browsers can be used not just to browse web pages but also to transfer and manage files via FTP and to read Netnews via NNTP, but these extra client functions of web browsers do not involve a web server, but rather, FTP and NNTP servers, respectively.

The content that is served by web servers has increased greatly in sophistication over the decade or so that the web has existed. Web content in the beginning consisted mainly of static web pages containing mostly text. Web content now is dynamic rather than static. The content has become sophisticated enough to enable a rich set of Internet applications, including electronic commerce and streaming multimedia. But underneath it all is the web server, which has also grown in sophistication to serve the dynamic content that is demanded on the web today.

The two basic common features of a modern web server are

  • HTTP responses to HTTP requests   Every web server program operates by accepting HTTP requests from the network and providing a HTTP response to each requester. The HTTP response typically consists of an HTML document, but it can also be a text file, an image, or some other type of document. If an error is encountered in a client request, or while trying to serve the request, a web server will serve a HTML document containing an error code and a brief explanation of the error to the requesting user.

  • Logging   Web servers will usually have the capability of logging detailed information about client requests and server responses to log files. This allows a webmaster to analyze the logs or to collect usage statistics manually or by running analyzers on the log files.

Modern web servers also implement these features:

  • Configuration of available features using configuration files or through external interfaces.

  • Authentication (using user name and password) before allowing access to some or all resources.

  • Handling of static content (file content stored on the file system of the web server machine) as well as dynamic content. Dynamic content is handled by supporting a collection of related methods, including SSI, CGI, PHP, ASP, and server APIs, discussed in Chapter 27.

  • Module support to allow the extension of web server capabilities by adding or modifying software modules that are linked to the web server software or that are dynamically loaded (on demand) by the core web server.

  • HTTPS support (through SSL or TLS) to allow secure connections, using encryption, to the server on the standard network port 443 instead of the usual HTTP port 80.

  • Content compression, for example, through GZIP encoding to reduce the size of the responses in order to decrease network bandwidth usage.

  • Creation of virtual hosts that serve many web sites using one IP address.

  • Support for large files, so that files of sizes greater than 2GB on 32-bit operating system can be served.

  • Bandwidth throttling to limit the speed of responses in order not to saturate the network and to be able to serve more clients.

Both proprietary and open-source web servers are available for every major version of UNIX. Notable among the proprietary web servers are Sun’s Java System Web Server (formerly Sun ONE Web Server, iPlanet Web Server, and Netscape Enterprise Server) and the Zeus Web Server. This chapter will describe the most widely-used web server on the Internet, the Apache Web server, which has become almost a de facto standard on UNIX and Linux platforms. What follows will be a nonexhaustive description of the process of installing, configuring, and administering Apache to operate a small web site with mostly static content on the Internet. Also included will be descriptions of the configuration options needed to serve dynamic content and to ensure that the web server runs securely. Even if you have no interest in web development or in being a “webmaster,” Apache has become such an important applications platform for many useful and free web applications-discussion boards, blogging, calendars, content management systems, and wikis, for example-that it may behoove you to give Apache a try.




UNIX. The Complete Reference
UNIX: The Complete Reference, Second Edition (Complete Reference Series)
ISBN: 0072263369
EAN: 2147483647
Year: 2006
Pages: 316

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