How to enable apache modules? this question is very common among system administrators. You can easily enable necessary apache / apache2 modules by using the Linux command “a2enmod”.

The Apache HTTP Server is the world’s most widely used web server software. Apache is developed and maintained by an Open community of Apache Software Foundation. Apache is free and open-source software and it is available for a wide variety of operating systems, including Unix, Linux, Microsoft Windows, OS X, OS/2, Solaris, TPF, OpenVMS, NetWare, FreeBSD, and eComStation.

The developer needs some additional modules to be installed/enabled based on project requirements. Apache provides the easiest way to enable and disable apache modules by using simple commands.

Note: These commands only accessible for “sudo” privilege users

How to enable apache modules? (a2enmod)

sudo a2enmod [module name]

a2enmod is an inbuilt script that enables the given module in the apache configuration file by creating symlinks.

a2enmod: enable/disable an apache module in APACHE_MODULES in /etc/sysconfig/apache2

usage: a2enmod [-d] module
 a2enmod -l list modules
 a2enmod -q module query if module is installed

HTTPD_INSTANCE=<instance_name> environment variable can be used to specify apache instance


To enable ‘ssl’ module:

sudo a2enmod ssl

After enabling apache modules you should reload/restart your apache to initialize given changes in the server.


Leave a Reply

Your email address will not be published. Required fields are marked *

Sign In


Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.