You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/security/ssl/ssl-apache2-debian-ubuntu.md
+19-6Lines changed: 19 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,24 +30,31 @@ This guide assumes that you are running Apache2.4 or higher on Debian 8 or Ubunt
30
30
- If hosting multiple websites with commercial SSL certificates on the same IP address, use the [SNI](https://wiki.apache.org/httpd/NameBasedSSLVHostsWithSNI) extension of TLS. SNI is accepted by most modern web browsers. If you expect to receive connections from clients running legacy browsers (Like Internet Explorer for Windows XP), you will need to [contact support](/docs/platform/support) to request an additional IP address.
31
31
32
32
33
-
##Get the CA Root Certificate
33
+
##Get the CA Root Certificate and Applicable Intermediate Certificates
34
34
35
-
{: .note }
35
+
{: .note}
36
+
>
36
37
> If you're using a self-signed certificate, skip this step.
37
38
38
-
Download the root certificate for the provider that issued your commercial certificate before you can begin using it. You may obtain the root certs for various providers from these sites:
39
+
Download the root certificate and any applicable intermediate certificates for the provider that issued your commercial certificate before you can begin using it. You may obtain the root certs for various providers from these sites:
Most providers will provide a root certificate file as either a .cer or .pem file. Save the provided root certificate in `/etc/ssl/localcerts`.
47
+
Most providers will provide a root certificate file as either a .cer or .pem file. Save the provided root certificate and applicable intermediate certificates in separate files in `/usr/share/ca-certificates/mozilla`. If the file for a certificate already exists there, replace the content of the file with the provided file's content if different.
48
+
49
+
Update certificate trust store:
50
+
51
+
sudo update-ca-certificates
52
+
53
+
This updates system hooks and the main ca-certificate.crt file located in `/etc/ssl/certs`.
47
54
48
55
## Configure Apache to use the SSL Certificate
49
56
50
-
1. Edit the virtual host configuration files located in `/etc/apache2/sites-available`, to provide the certificate file paths. For each virtual host, replicate the configuration shown below. Replace any mentions of `example.com` with your own domain. You will also need to ensure that the `SSLCACertificateFile` value is configured to point to the CA root certificate downloaded in the previous step:
57
+
1. Edit the virtual host configuration files located in `/etc/apache2/sites-available`, to provide the certificate file paths. For each virtual host, replicate the configuration shown below. Replace any mentions of `example.com` with your own domain. You will also need to ensure that the `SSLCACertificateFile` value is configured to point to the ca-certificates.crt file updated in the previous step:
51
58
52
59
{: .file-excerpt }
53
60
Apache virtual hosting file
@@ -56,7 +63,7 @@ Most providers will provide a root certificate file as either a .cer or .pem fil
SSLCACertificateFile /etc/ssl/localcerts/ca.pem # If using a self-signed certificate, omit this line
66
+
SSLCACertificateFile /etc/ssl/localcerts/ca-certificates.crt # If using a self-signed certificate, omit this line
60
67
61
68
ServerAdmin info@example.com
62
69
ServerName www.example.com
@@ -74,4 +81,10 @@ Most providers will provide a root certificate file as either a .cer or .pem fil
74
81
75
82
service apache2 restart
76
83
84
+
(If troubleshooting problems, a reboot may be required.)
85
+
86
+
{: .note}
87
+
>
88
+
> Your installation can appear to be correct in some browsers while not actually being correct, so test your installation using the test page at your certificate issuer's website. Alternately you can run `openssl s_client -CApath /etc/ssl/certs/ -connect example.com:443` and check for errors.
89
+
77
90
You should now be able to visit your site with SSL enabled.
0 commit comments