How To: Enable apache modules under Debian based system — page 2
2. Adding modules
Now, taking into account the strucutre of apache, it is pretty easy to add modules to be loaded by apache. Let’s assume that you want to add mime_magic module. To do so, you can either:
- add it by hand:
$ cd /etc/apache2/mods-enabled
$ sudo ln -s ../mods-available/mime\_magic.conf mime\_magic.conf
$ sudo ln -s ../mods-available/mime\_magic.load mime\_magic.load
OR
- add it the debian way with a2enmod:
$ sudo a2enmod
Which module would you like to enable?
Your choices are: actions asis auth_anon auth_dbm auth_digest auth_ldap cache cern_meta cgid cgi dav_fs dav deflate disk_cache expires ext_filter file_cache headers imap include info ldap mem_cache mime_magic php5 proxy_connect proxy_ftp proxy_http proxy rewrite speling ssl suexec unique_id userdir usertrack vhost_alias
Module name? mime_magic
Module mime_magic installed; run /etc/init.d/apache2 force-reload to enable.
That’s it, your module will now be loaded next time you start apache. You can actually avoid restarting apache, by asking it to simply reload its configuration:
$ sudo /etc/init.d/apache2 reload
And here you go, your new added module is included in apache.