Datasheet

“main” (Installation and Administration) 2004/6/25 13:29 page 532 #558
i
i
i
i
i
i
i
i
22.3 Apache Modules
By means of modules, Apache can be expanded with a wide range of
functions. For example, Apache can execute CGI scripts in diverse pro-
gramming languages by means of modules. Apart from Perl and PHP, ad-
ditional scripting languages, such as Python or Ruby, are also available.
There are modules for secure data transmission (secure sockets layer, SSL),
user authentication, expanded logging, and other functions.
By means of custom modules, Apache can be adapted to all kinds of re-
quirements and preferences. This requires a certain amount of know-how.
For further information, refer to Section 22.13.4 on page 553.
Several “handlers” can be specified for processing queries (by means of di-
rectives in the configuration file). These handlers can be part of Apache
or a module invoked for processing the query, so this procedure can be
arranged in a very flexible way. It is also possible to use custom modules
with Apache to influence the way in which requests are processed.
The modularization in Apache 2 has reached an advanced level, where
everything except some minor tasks is handled by means of modules.
In Apache 2, even HTTP is processed by way of modules. Accordingly,
Apache 2 does not necessarily need to be a web server. It can also be used
for completely different purposes with other modules. For example, there
is a proof-of-concept mail server (POP3) based on Apache.
Apache supports a number of useful features, some of which are described
below.
Virtual Hosts Support for virtual hosts means that a single instance of
Apache and a single machine can be used for several web sites. To
users, the web server appears as several independent web servers.
The virtual hosts can be configured on different IP addresses or on
the basis of names. This saves the acquisition costs and administra-
tion workload for additional machines.
Flexible URL Rewriting Apache offers a number of possibilities for ma-
nipulating and rewriting URLs. Check the Apache documentation
for details.
Content Negotiation Apache can deliver a page that is adapted to the
capabilities of the client (browser). For example, simple versions
without frames can be delivered for older browsers or browsers that
only operate in text mode, such as Lynx. In this way, the JavaScript in-
compatibility of various browsers can be circumvented by delivering
532 22.3. Apache Modules