Debian & Ubuntu provide the apache2-mpm-prefork or apache2 packages for Apache 2.2 and 2.4 respectively. These are both installed by the Synaptic package manager or the apt-get command.
| Operating System | Apache version | Install package | mod_wcm library |
|---|---|---|---|
| Debian 5, 6 & 7 | 2.2 | apache2-mpm-prefork | mod_wcm.so |
| Ubuntu 8 -> 12 | 2.2 | apache2-mpm-prefork | mod_wcm.so |
| Debian 8 or later | 2.4 | apache2 | mod_wcm_24.so |
| Ubuntu 13 or later | 2.4 | apache2 | mod_wcm_24.so |
To start and stop Apache, use the /usr/sbin/apache2ctl script.
The configuration of Apache has been separated out from /etc/apache2/httpd.conf. LoadModule directives are held in /etc/apache2/mods-available/*.load, while their configuration, eg Location clauses, are stored in /etc/apache2/mods-available/*.conf. To enable a module the .conf & .load files are symbolically linked into the /etc/apache2/mods-enabled directory. The modules themselves reside in the /usr/lib/apache2/modules directory.
So to implement our mod_wcm.so example, we would copy mod_wcm.so into /usr/lib/apache2/modules and create /etc/apache2/mods-available/wcm.load:
LoadModule wcm_module /usr/lib/apache2/modules/mod_wcm.so
The configuration for mod_wcm.so is then stored in a /etc/apache2/mods-available/wcm.conf file:
<Location /K8_CVS6 > Order allow,deny Allow from all # mod_filter and mod_deflate must be loaded AddOutputFilterByType deflate text/plain text/html text/css text/xml application/soap+xml </Location> <Location /K8_CVS6/KCMLTest > SetHandler kcml-soap KcmlSOAPServers localhost:790 </Location>
Finally wcm.conf and wcm.load are symbolically linked into the /etc/apache2/mods-enabled directory:
$ cd /etc/apache2/mods-enabled $ ln -s ../mods-available/wcm.conf . $ ln -s ../mods-available/wcm.load .
Apache 2.4 may be configured, by default, to use the event MPM, which is not compatible with mod_wcm_24.so. This can be easily changed by removing the symbolic links for the event MPM and then adding symbolic links for the prefork MPM.
$ cd /etc/apache2/mods-enabled $ rm mpm_event.load mpm_event.conf $ ln -s ../mods-available/mpm_prefork.conf . $ ln -s ../mods-available/mpm_prefork.load .