Skip to content

Instantly share code, notes, and snippets.

@kktuax
Last active April 10, 2020 01:20
Show Gist options
  • Save kktuax/c617124fb90b97029e6b to your computer and use it in GitHub Desktop.
Save kktuax/c617124fb90b97029e6b to your computer and use it in GitHub Desktop.
SSL instructions for Apache HTTP Server

Input files for domain mydomain.es

-rw-r--r-- 1 www-data www-data 1,5K 2014-07-09 18:26 AddTrustExternalCARoot.crt
-rw-r--r-- 1 www-data www-data 2,0K 2014-07-09 18:26 COMODORSAAddTrustCA.crt
-rw-r--r-- 1 www-data www-data 2,2K 2014-07-09 18:26 COMODORSADomainValidationSecureServerCA.crt
-rw-r--r-- 1 www-data www-data 1,9K 2014-07-09 18:26 mydomain_es.crt
-rw-r--r-- 1 www-data www-data 1,1K 2014-07-09 17:48 mydomain_es.csr
-rw-r--r-- 1 www-data www-data 1,7K 2014-07-09 17:48 mydomain_es.key

Create bundle file

sudo touch mydomain_es.ca-bundle
sudo sh -c "cat COMODORSADomainValidationSecureServerCA.crt >> mydomain_es.ca-bundle"
sudo sh -c "cat COMODORSAAddTrustCA.crt >> mydomain_es.ca-bundle"
sudo sh -c "cat AddTrustExternalCARoot.crt >> mydomain_es.ca-bundle"

Configure certificate in apache

SSLCertificateKeyFile /etc/apache2/ssl/mydomain_es.key
SSLCertificateFile /etc/apache2/ssl/mydomain_es.crt
SSLCertificateChainFile /etc/apache2/ssl/mydomain_es.ca-bundle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment