I have an existing httpd.conf file which I am supposed to get to work on a Vagrant instance running Ubuntu, which I am using Puppet to provision.
The problem I am running up against is with module names. httpd.conf specifies a bunch of modules like so:
LoadModule access_compat_module modules/mod_access_compat.so
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule allowmethods_module modules/mod_allowmethods.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_basic_module modules/mod_auth_basic.so
To set up all of these modules, I need to tell the Puppet Apache module I am using (by Example42) what module names I want to install and enable. The problem is that the module names are not a 1:1 match with the httpd.conf lines. In other words, module names cannot always be inferred from the file.
For example, here is me, trying to enable the first line on the file (mod_access_compat.so
):
vagrant@lucid64:~$ sudo a2enmod access_compat
ERROR: Module access_compat does not exist!
vagrant@lucid64:~$ sudo a2enmod access_compat_module
ERROR: Module access_compat_module does not exist!
vagrant@lucid64:~$ sudo a2enmod accesscompat
ERROR: Module accesscompat does not exist!
tl;dr: How can I know the correct module name for a2enmod
without trying to guess?
Best Answer
If the module you are searching for is a variable you can search for its name inside
/etc/apache2/mods-available/
Use
find
command to search for a file that have that part of string you know about the mod,e.g.
find /etc/apache2/mods-available/ -name *\lite\*
output
/etc/apache2/mods-available/charset_lite.load
put the string you want between
*\...\*
as what ever before or after this word