By means of modules, Apache can be expanded with a wide range of functions. For example, Apache can execute CGI scripts in diverse programming languages by means of modules. Apart from Perl and PHP, additional 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 requirements and preferences. This requires a certain amount of know-how. For further information, refer to Section 22.13.4. “Additional Sources”.
Several “handlers” can be specified for processing queries (by means of directives 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.
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 administration workload for additional machines.
Apache offers a number of possibilities for manipulating and rewriting URLs. Check the Apache documentation for details.
React flexibly and provide a suitable response in the event of an error, such as nonexistent pages. The response can even be generated actively, for example, with CGI.