Installation of apache self signed certificate

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)

SSL is an essential factor to secure user’s sensitive data on the web. A Self signed certificate also useful to keep security like webmail etc. If you have created self signed certificate and then, in the next step, you just need to configure your Apache virtual host to use the SSL certificate. If you only have one Apache virtual host to secure and you have an ssl.conf file being loaded, you can just edit that file. Otherwise, you will need to make a copy of the existing non-secure virtual host, paste it below, and change the port from port 80 to 443.

Step to Install Self Sign SSL on Apache

Step: – 1
Open your Apache configuration file in a text editor.  Its location place may be different, depend on your operating system and Apache version, but generally you will find it at /etc/httpd/httpd.conf. In windows sysyem, you will find it at

C:\Program Files\Apache\Apache2\conf\httpd.conf

Step – 2
Mostly, you will find the <VirtualHost> blocks in a separate file in a directory like /etc/httpd/vhosts.d/ or /etc/httpd/sites/.  Add the lines in bold below.


DocumentRoot /var/www/website


SSLEngine on

SSLCertificateFile /etc/ssl/crt/primary.crt

SSLCertificateKeyFile /etc/ssl/crt/private.key

SSLCertificateChainFile /etc/ssl/crt/intermediate.crt


Step – 3
Modify the file and path names to match your certificate files. Save the changes and exit the text editor.

Step – 4
Restart your Apache web server using one of the following commands:

/usr/local/apache/bin/apachectl startssl

/usr/local/apache/bin/apachectl restart