Apache HTTPS Configuration

  • Navigate to the folder containing the openssl.cnf (Apache2.4/Conf) file and execute the commands:
openssl req -config openssl.cnf -new -out certificate.csr -keyout certificate.pem
 openssl rsa -in certificate.pem -out certificate.key
 openssl x509 -in certificate.csr -out certificate.crt -req -signkey certificate.key -days 3650
  • Enable mod_ssl in httpd.conf or by executing a2enmod ssl.
  • Configure httpd.conf:
Listen 443
<VirtualHost *:443>
 servername test.com
 serveralias www.test.com
 SSLEngine On
 SSLCertificateFile "Path To certificate.crt"
 SSLCertificateKeyFile "Path To certificate.key"
 DocumentRoot "Path to Document root"

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 )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s