Install SSL through Shell

Today, I’m about to guide you how to install the SSL key and it will a bit tricky compare to generate the SSL CSR key.

To install the SSL key through Shell, refer to the step as below.
1. Go to path /usr/share/ssl/certs.
$ mickgenie@mickgenie.com[/]# cd /usr/share/ssl/certs
2. Check if the domain.com.csr and domain.com.cabundle existed, else create them and enter the code.
3. Go to path /usr/share/ssl/private.
$ mickgenie@mickgenie.com[/]# cd /usr/share/ssl/private
4. Use the CA key and create the domain.com.key and enter the code.
5. Backup your httpd.conf file and enter the following code before your virtualhost tag.

SSLEnable
SSLCertificateFile /usr/share/ssl/certs/domain.com.crt
SSLCertificateKeyFile /usr/share/ssl/private/domain.com.key
SSLCACertificateFile /usr/share/ssl/certs/domain.com.cabundle
SSLLogFile /usr/local/apache/domlogs/domain.com-ssl_data_log
SetEnvIf User-Agent “.*MSIE.*” nokeepalive ssl-unclean-shutdown

Note: If cabundle not exist then remove the whole line of cabundle(line4).

6. Restart the httpd services.

Published by

Mick Genie

Mick Genie is the founder of MickGenie.com and working at ExaBytes Network Sdn Bhd and WPWebHost web host company. He is expertise in Windows and Linux environment especially web hosting related information, tips and trick as well as the IT Information.

One thought on “Install SSL through Shell”

Comments are closed.