For a basic installation, it is sufficient to select the Apache package apache2. Additionally, 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 must be activated as a service in the runlevel editor. To start it during system boot, 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, see an example page, assuming 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 described in 23.8.5. “Generating Active Contents with Modules”.
It is advisable to install the documentation provided in the package apache2-doc. After the package has been installed and the server started as described in 23.5.2. “Activating Apache”), the documentation can be accessed directly with the URL http://localhost/manual.
To be able to develop modules for Apache or compile third-party modules, the package apache2-devel is additionally required along with the corresponding development tools. These also contain the apxs tools, which are described in 23.5.5. “Installing 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.
Install a module from source code with a command like apxs2 -c -i -a mod_foo.c. Other options of apxs2 are described in its man page. The modules should then be activated in /etc/sysconfig/apache2 with the entry APACHE_MODULES as described in 23.6.1. “Configuration with SuSEconfig”.
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.