How do i determine if OpenSSL and mod_ssl are installed on apache2

0 votes
asked Sep 2, 2009 by fiona

does anyone know the command to determine if OpenSSL and mod_ssl are installed on apache2?

Regards, Fiona

12 Answers

0 votes
answered Jan 4, 2009 by chiwai-chan

You should install this Apache mod,, it basically gives you a run down of the mods you're using and the Apache settings. I have this enabled on my Apache and it gives me this info for my website,

Server Version: Apache/2.2.3 (Debian) mod_jk/1.2.18 PHP/5.2.0-8+etch13 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8

0 votes
answered Sep 4, 2009 by brianegge

The default Apache install is configured to send this information on the Server header line. You can view this for any server using the curl command.

$ curl --head http://localhost/
HTTP/1.1 200 OK
Date: Fri, 04 Sep 2009 08:14:03 GMT
Server: Apache/2.2.8 (Unix) mod_ssl/2.2.8 OpenSSL/0.9.8a DAV/2 PHP/5.2.6 SVN/1.5.4 proxy_html/3.0.0
0 votes
answered Sep 10, 2011 by tunix2fr

Usually, when you compile your apache2 server (or install it by packages facility stuff), you can check any directive that're available to be used by tapping this command:

~# $(which httpd) -L | grep SSL # on RHEL/CentOS/Fedora
~# $(which apache2) -L | grep SSL # on Ubuntu/Debian

If you don't see any SSL* directive, it means that you don't have apache2 with mod_ssl compiled.

Hopes it helps ;)

0 votes
answered Sep 20, 2012 by mohamed-elbou

If you have PHP installed on your server, you can create a php file, let's called it phpinfo.php and add this <?php echo phpinfo();?>, and open the file in your browser, this shows information about your system environment, to quickly find info about your Apache loaded modules, locate 'Loaded Modules' on the resulting page.

0 votes
answered Sep 11, 2013 by user2158343

If you have PHP installed on your server, you can chek it in runtime using "extension_loaded" funciontion. Just like this:

if (!extension_loaded('openssl')) {
    // no openssl extension loaded.
0 votes
answered Jan 22, 2014 by michael-niemand

Just look in the ssl_engine.log in your Apache log directory where you should find something like:

[ssl:info] [pid 5963:tid 139718276048640] AH01876: mod_ssl/2.4.9 compiled against Server: Apache/2.4.9, Library: OpenSSL/1.0.1h
0 votes
answered Sep 13, 2014 by kaizencoder

If you just run openssl in your terminal it should present the openSSL shell. My first clue to knowing that I didn't have mode_ssl was when I got the following error after adding SSLEngine on in my virtualhost file:

Invalid command 'SSLEngine', perhaps misspelled or defined by a module not included in the server configuration

In centos I just had to install it via yum install mod_ssl

0 votes
answered Jan 13, 2015 by lakshmikandan

To determine openssl & ssl_module

# rpm -qa | grep openssl


# httpd -M | grep ssl


# rpm -qa | grep ssl
0 votes
answered Jan 30, 2015 by alex-w

Using Apache 2, you can see what modules are currently loaded by the HTTP daemon by running the following command:

apache2ctl -M

The -M option is really just a parameter passed to httpd.

apache2ctl is a front end to the Apache HyperText Transfer Protocol (HTTP) server. It is designed to help the administrator control the functioning of the Apache apache2 daemon.

   NOTE: The default Debian configuration requires the environment variables APACHE_RUN_USER,
   APACHE_RUN_GROUP, and APACHE_PID_FILE to be set in /etc/apache2/envvars.

   The apache2ctl script returns a 0 exit value on success, and >0 if an error  occurs.   For
   more details, view the comments in the script.
0 votes
answered Sep 26, 2015 by steve-piercy

Use the following commands.

$ openssl version
OpenSSL 1.0.1e-fips 11 Feb 2013 (or similar output)

For RHEL/CentOS/Fedora:

$ httpd -t -D DUMP_MODULES | grep ssl
ssl_module (shared)

For Ubuntu/Debian

$ apache2 -t -D DUMP_MODULES | grep ssl
ssl_module (shared)


$ httpd2 -t -D DUMP_MODUELS | grep ssl
ssl_module (shared)
Welcome to Q&A, where you can ask questions and receive answers from other members of the community.
Website Online Counter