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 accessing such modules. Apart from Perl and PHP, additional scripting languages, such as Python or Ruby, are also available. There are also modules for secure data transmission (secure sockets layer, SSL), user authentication, expanded logging, and many more functions.
With a necessary amount of know-how, Apache can be adapted with custom-written modules to all kinds of requirements and preferences. For information, refer to 23.12.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 has reached an advanced level, where everything except some minor tasks is handled by means of modules. This has progressed so far that even HTTP is processed by way of modules. Accordingly, Apache 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 modules provide several additional useful features:
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 in the case of a nonexistent page. The response can even be generated dynamically, for example, with CGI.