Step of Installation OpenSSL, If you want to secure your website with SSL, you need to install an SSL Certificate on the Apache server. We have two SSL certificate which is free to install. we can install and configure the OpenSSL certificate in Linux.
Step of Installation OpenSSL Certificate In CentOS 7:
1. OpenSSL Certificate
Today I will show you how to install SSL Certificate using OpenSSL, I have already installed Apache on the server.
Check Out: Configure Virtual Hosting
Apache Web Server Service Running,
I have already configured virtual hosting on the server & it’s accessible pankaj.com. We will create a certificate for pankaj.com.
Check Out: Change Apache Port
You need to install the required packages for OpenSSL certificate are mod_ssl & OpenSSL.
After installing the packages, now we will create a private key.
Openssl genrsa -out pankaj.key 2048
Now we will create a CSR key using the private key
Openssl req -new -key pankaj.key -out pankaj.csr
Check Out: Load PHP Module For Apache
Now create a crt key using CSR key
Openssl x509 -req -days 365 -in pankaj.csr -signkey pankaj.key -out pankaj.crt
As you can see we have all the required certificate keys here.
Now copy the keys at the location shown in the figure.
Check Out: Configure Varnish For Apache Web Server
Now go to the SSL config file which is located at /etc/httpd/conf.d/ssl.conf & changed the certificate locations.
Restart the httpd service & Add SSL 443 port in the firewall & reload the firewall.
Now you go to the browser & check the website with https://pankaj.com
You’re done configure certificate openssl install linux