For a basic installation, it is sufficient to select the Apache package apache2. Additionally, you may install one of the MPM (multiprocessing module) packages, such as apache2-prefork or apache2-worker. When choosing an MPM, remember that the thread-based worker MPM cannot be used with mod_php4, as some of the libraries of mod_php4 are not yet thread-safe.
After installation, Apache will not be started automatically. To start Apache, activate it in the runlevel editor. To start it permanently when the system is booted, check runlevels 3 and 5 in the runlevel editor. To test whether Apache is running, go to http://localhost/ in a browser. If Apache is active, you will see an example page, provided apache2-example-pages is installed.
To use active contents with the help of modules, install the modules for the respective programming languages. These are apache2-mod_perl for Perl, mod_php4 for PHP, and mod_python for Python. The use of these modules is covered in Section 15.9.5. “Generating Active Contents with Modules”.
Additionally, you should install the extensive documentation provided in apache2-doc. An alias (Section 15.7. “Configuration” explains what an alias is) is available for the documentation, enabling you to access it with the URL http://localhost/manual following the installation.
To develop modules for Apache or compile third-party modules, install apache2-devel and the needed development tools. These include the apxs tools, which are described in Section 15.6.5. “Installation of Modules with apxs”.
apxs2 is an important tool for module developers. This program enables the compilation and installation of modules from source code with a single command (including the required changes to the configuration files). Furthermore, you can also install modules available as object files (extension .o) or static libraries (extension .a). When installing from sources, apxs2 creates a dynamic shared object (DSO), which is directly used by Apache as a module.
The installation of a module from source code can be performed with a command like apxs2 -c -i -a mod_foo.c. Other options of apxs2 are described in its man page.
apxs2 is available in several versions: apxs2, apxs2-prefork, and apxs2-worker. apxs2 installs modules so they can be used for all MPMs. The other two programs install modules so they can only be used for the respective MPMs (prefork or worker). apxs2 installs modules in /usr/lib/apache2 and apxs2-prefork installs modules in /usr/lib/apache2-prefork.
The option -a should not be used with Apache 2, as this would cause the changes to be written directly to /etc/apache2/httpd.conf. Rather, modules should be activated by means of the entry APACHE_MODULES in /etc/sysconfig/apache2 as described in Section 15.7.1. “Configuration with SuSEconfig”.