Follow these instructions to install your SSL server certificate.
- Your SSL server certificate will be sent to you by email. The email message includes the web server certificate that you purchased in the body of the email message. Copy the certificate from the body of the email and paste it into a simple text editor, such as Notepad.
- Save the server certificate to the Apache server directory in which you plan to store your certificates.
Tip: the default directory will be
/etc/httpd/conf/ssl.crt/
if you installed Apache using the RPM or/usr/local/apache/conf/ssl.crt/
directory if you installed Apache using the source files. Please note that ssl.crt is a directory, not a file. - Open the Apache httpd.conf file in a text editor.
- Locate the SSL VirtualHost container associated with your certificate. Verify that you have the following two directives within this virtual host. Please add them if they are not present:
If your path is /etc/httpd/conf/…
SSLCertificateFile /etc/httpd/conf/ssl.crt/domainname.crt (or server.crt)
SSLCertificateKeyFile /etc/httpd/conf/ssl.key/domainname.key (or server.key)Or, if your path is /usr/local/apache/conf/…
SSLCertificateFile /usr/local/apache/conf/ssl.crt/domainname.crt (or server.crt)
SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/domainname.key (or server.key) - Save the changes and exit the editor.
- Start or Restart your apache web server using one of the following commands:
By default:/usr/local/apache/bin/apachectl startssl
or
/usr/local/apache/bin/apachectl restart
Other commands:
/usr/sbin/httpd startssl or restart
/usr/sbin/httpd startssl or restart
Test Your SSL Certificate
Test your SSL certificate by using a browser to connect to your server. Use the https protocol directive. For example, if your SSL was issued to secure.mysite.com, enter https://secure.mysite.com
into your browser.
Your browser’s padlock icon will be displayed in the locked position if your certificate is installed correctly and the server is properly configured for SSL.