Install ssl certificate on apache server in ubuntu 16.04

Install Apache2

sudo apt-get install apache2

Enable SSL Module

sudo a2enmod ssl

Apply SSL Module to Site

sudo a2ensite default-ssl
sudo /etc/init.d/apache2 restart

Add your certificates in default-ssl.conf in /etc/apache2/sites-available

SSLEngine on
SSLCertificateFile /path/to/your_domain_name.crt
SSLCertificateKeyFile /path/to/your_private.key
SSLCertificateChainFile /path/to/DigiCertCA.crt

 

Sometimes you need to create a .ca-bundle file. Use this command to create it

Note : the names of files should be something similar

cat ComodoRSAAddTrustCA.crt ComodoRSADomain/Organization/ExtendedvalidationSecureServerCA.crt AddTrustExternalCARoot.crt > yourDomain.ca-bundle

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s