How to enable Apache modules

Cătălin Mariș edited this page Nov 9, 2013 · 1 revision
Clone this wiki locally


  1. MAMP PRO. On the main screen, click the Apache tab and ensure that all the required modules are 'checked', indicating they are enabled.

  2. MAMP. Locate the httpd.conf file, which is typically found in /Applications/MAMP/conf/apache/httpd.conf. Open the file in a text editor and uncomment all of the required modules. Once you have done so, reset MAMP.

  3. XAMPP. Follow the same steps as for MAMP, but look for httpd.conf in /Applications/XAMPP/etc/httpd.conf.


These instructions should work on any distribution where apt-get has been used to install Apache.

  1. Open up a terminal and type the following command. Enter your password when prompted.

    sudo a2enmod setenvif headers deflate filter expires rewrite include

  2. Restart apache by using the following command so the new configuration takes effect.

    sudo /etc/init.d/apache2 restart


You've got a couple of options that depend on how you installed Apache.

  1. WampServer. This is by far the simplest option. If you have installed WampServer just click on the icon in the task bar, hover over the Apache section in the menu that comes up and then hover over the modules section. You will be presented with a list of modules. Simply click on a module name to enable it (or disable it if it is already enabled). A check mark next to a module indicates that it is enabled. WampServer will automatically restart the Apache service after you enable a module.

  2. Manually editing httpd.conf. This assumes that you have manually installed Apache. You will need to locate the httpd.conf file which is normally in the conf folder in the folder where you installed Apache (for example C:\apache\conf\httpd.conf). Open up this file in a text editor. Near the top (after a bunch of comments) you will see a long list of modules. Check to make sure that the modules listed above are not commented out. If they are, go ahead and uncomment them and restart Apache.

That's it, you're done!