SSL Configuration to enable HTTPS Apache Web Server on Linux

setup https apache, enable https in apache linux, SSL configuration, Enabling SSL for Apache, how to enable ssl in apache web server, enable ssl, apache mod_ssl

SSL Configuration to enable Apache HTTPS Web Server on Linux

This article describes you how to setting up or enable Apache HTTPS (SSL) Web server with self-signed SSL certificate on Linux (RHEL7 / CentOS 7). A self-signed certificate will not validate the identity of your server, since it is not signed by a trusted certificate authorities, but it will allow you to encrypt communications between your server and your visitors.

Lab Server Setup:
Hostname :
IP Address :
Operating System : CentOS 7.2 - 64 Bit

1. We must have configured Apache HTTP Web Server, Refer this link to Install and configure Apache HTTP Web server on Linux.
2. Yum Repo must be enabled to install the required packages. Refer this link to configure the Yum Repo Server - Configure YUM Repo Server on Linux.

Required Packages : mod_ssl
Default config file: /etc/httpd/conf.d/ssl.conf
Default ports: 443 (SSL)

Once your Apache HTTP Web Server is ready, Use the following instructions to setting up the Apache HTTPS (SSL) Web Server on RHEL7 / CentOS7.
1. Install the SSL Module.

Install the appropriate package "mod_ssl" using yum to avoid dependencies issue.
[root@node1 ~]# yum -y install mod_ssl
Apache Web server will be able to start using an SSL certificate after the httpd service is restarted.

2. Generate a New Certificate.

The certificate will store some basic information about our site, and will be accompanied by a key file that allows the server to securely handle encrypted data. You can also create a dedicated directory for each websites and keep the certificates safely if you hosted multiple websites on a single node. use "openssl" utility to create the SSL Certificate.
[root@node1 ~]# openssl req -new -x509 -nodes -out /etc/pki/tls/certs/ -keyout /etc/pki/tls/private/ -days 365
After we enter the request, this will prompt for a input where we can enter needed information about our website.
Country Name (2 letter code) [XX]:
State or Province Name (full name) []:
Locality Name (eg, city) [Default City]:
Organization Name (eg, company) [Default Company Ltd]:
Organizational Unit Name (eg, section) []:
Common Name (eg, your name or your server's hostname) []
Email Address []:
Replace "" with your server name.

Edit the /etc/httpd/conf.d/ssl.conf file, search for the SSLCertificate string and replace as follows:
SSLCertificateFile /etc/pki/tls/certs/
SSLCertificateKeyFile /etc/pki/tls/private/
Search for the directive "ServerName" in the same file and replace with your server name instead of "".
3. Restart the httpd service.
[root@node1 ~]# systemctl restart httpd
Open the browser from client and enter the URL you could see the message as "This Connection is Untrusted" as shown in the below image.

this connection is untrusted

Just click "I undestand the Risks" and Select "Add Exception". This will popup an box as shown in the below image.

confirm security exceptions

Just select "Confirm security exceptions". That's all about setting up Apache Web Server with https (SSL) on Linux Servers.

Also refer other Apache related articles,
Apache Virtual Host Configuration to run Multiple Websites
How to Configure Apache HTTP Web server on RHEL7 / CentOS7

Thanks for reading our post. share with your friends. We appreciate your feedback, Leave your comments if any.
We have more articles to be updated soon. To not miss any updates, Follow us on social networking sites and Subscribe us on our Youtube channel.
setup https apache, enable https in apache linux, SSL configuration, How To Set Up Apache with https, Step by Step Configuring SSL, SSL Certificate Installation, Enabling Https with Apache, Setting up an SSL secured Webserver, How to configure HTTPS on Apache, Enabling SSL for Apache, Apache SSL Installation Instructions, how to enable ssl in apache web server, enable https in apache centos, apache enable ssl centos, apache mod_ssl
March 12, 2016

Post a Comment


Contact Form


Email *

Message *

Powered by Blogger.
Javascript DisablePlease Enable Javascript To See All Widget