Get your FREE copy of "The Ultimate Guide of SSL"

Download Ebook

Installation of apache self signed certificate

SSL is an essential factor in securing user’s sensitive data on the web. A self-signed certificate is also useful in securing webmail etc. If you have created a self-signed certificate and then, in the next step, you have to configure your Apache virtual host to use the SSL certificate. If you have only one Apache virtual host to secure and you have a ssl.conf file loaded, you can 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 may be different, depending upon your operating system and Apache version, but generally you will find it at /etc/httpd/httpd.conf. In windows system, 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

⏬ ⏬  Get rid of “⚠️ Not Secure” warning with these trusted SSL Certificates  ⏬ ⏬ 



Comodo Positive SSL


Vendor Price: $41.73

Coupon Code: ASCSCPSSL4

Get It Now



RapidSSL Certificate


Vendor Price: $69

Coupon Code: ASRSRSSL2

Get It Now



Comodo PositiveSSL Multi-Domain

$17.54 – 2 SAN Included

Vendor Price: $41.73

Coupon Code: ASCSCPMD4

Get It Now

Disclosure: AboutSSL appreciates your continuous support. It helps us tremendously to keep moving in the competitive SSL industry. Here most of the links which direct you to buy any SSL/TLS related service or products earns us a certain percentage of referral commission. Learn More