How to Check if mod_ssl is Enabled in Apache

check mod_ssl enabled

mod_ssl module is essential to manage SSL certificates and encryption in Apache server. However, before you configure your SSL certificates in Apache, it is important to check if mod_ssl is enabled in Apache. Here’s how you can do it.


How to Check if mod_ssl is Enabled in Apache

Before you proceed, you should know that there is no way to specifically check if a single module is installed/enabled in Apache. You can get a list of all enabled Apache modules, and you will need to look for mod_ssl in it.


There are 2 ways to check if mod_ssl is enabled in Apache.


1. From Terminal

You can SSH into your Linux Server or open a terminal window and paste the following command.

For RHEL/CentOS systems:

$ apachectl -M

For Debian/Ubuntu systems:

$ apache2ctl -M


You’ll see a list of enabled modules

apache loaded modules


Look for mod_ssl in it


2. Using phpinfo()

You can also get a list of loaded Apache modules via PHP. Create a blank info.php file at your website root (e.g /var/www/html)

Add the following code to it

<?php phpinfo(); ?>


Save and close the file.

Now open your web browser and visit http://your_domain_name/info.php. Replace your_domain_name with your actual domain name.

You will see the following output.

apache2handler check module


Scroll down to the “Loaded Modules” section to see the list of enabled modules.


Look for mod_ssl in it


Enable mod_ssl

If you can’t find mod_ssl in your list of loaded modules, you can enable it with the command

$ sudo a2enmod ssl


About Sreeram Sreenivasan

Sreeram Sreenivasan is the Founder of Ubiq, a business dashboard & reporting platform for small & medium businesses. Ubiq makes it easy to build business dashboards & reports for your business. Try it for free today!