Horje
How to Check if OpenSSL and mod_ssl are Installed on Apache2?

OpenSSL is an open-source software that is essential in various operations, like encryption or decryption of data, and such, which is used in various protocols like SSL, or TLS. mod_ssl is an Apache web server module that helps in providing secure communication via the same SSL or TLS protocols.

These are the following topics that we are going to discuss:

What is OpenSSL?

OpenSSL is an open-source toolkit that is responsible for creating and implementing SSL and TLS protocols, used for securing website connection, and data transfer among networks and websites.

What is mod_ssl?

mod_ssl is an Apache module that internally uses the OpenSSL toolkit to provide secure connection and data transfer among networks, by encrypting web traffic between servers and clients.

Check if OpenSSL is installed

To check if OpenSSL is installed, use the below command in the terminal:

openssl version

If it is installed, the output will be something like below:

file

Output

Methods to check OpenSSL and mod_ssl installed on Apache2

There are mainly two methods to check if the open SSL and mod_ssl are installed on Apache2 which are as follows:

Using apachectl CLI command

  • Apache comes with an internal utility commands, such as “apachectl” or “apache2ctl”, and depending on the machine configuration, either of the above will be available in the CLI to use.
  • To check if mod_ssl is enabled and installed on Apache2, use the below command in the terminal:
apachectl -M | grep ssl
or
apache2ctl -M | grep ssl
  • If it is enabled and installed, the output will be something like below:
file

Output

Checking the Apache config file

  • In this method, we will check in the apache config file itself whether the relevant commands are present for mod_ssl to be enabled on apache web server.
  • First, open the apache config file using the below command:
sudo vim /etc/apache2/apache2.conf
  • Search for mod_ssl directive, the below line, in the file. If the line is commented out, uncomment it
LoadModule ssl_module libexec/apache2/mod_ssl.so
file

Output

  • Now, check for SSL configuration in the “extra” dir, using the below command:
sudo vim /etc/apache2/sites-enabled/000-default.conf ( for checking the default configuration)

sudo vim/etc/apache2/mods-enabled/ssl.conf ( for checking the SSL configuration)
  • Now, to verify whether the SSL is enabled, there will be some configurations present in the above file, like SSLCertificateFile.
mod_ssl

Output




Reffered: https://www.geeksforgeeks.org


Web Technologies

Related
How to Use Postman for Sending POST Requests? How to Use Postman for Sending POST Requests?
Create and Manage Request Collections in Postman Create and Manage Request Collections in Postman
How to Convert Figma to WordPress? How to Convert Figma to WordPress?
How to Add Google Search to a WordPress Site? How to Add Google Search to a WordPress Site?
How to install WordPress with Ubuntu 20.04 and a LAMP Stack? How to install WordPress with Ubuntu 20.04 and a LAMP Stack?

Type:
Geek
Category:
Coding
Sub Category:
Tutorial
Uploaded by:
Admin
Views:
16