How to install an Intermediate CA cert in Apache?
Environment
- All Red Hat Enterprise Linux versions
- Apache httpd - all versions
Issue
- You need to install an Intermediate CA certificate. How to do it in Apache?
Resolution
Standard one-way HTTPS
- Backup up all involved files before manipulating them.
- Locate the Apache configuration file where your Virtual Host is configured.
-
Locate the line "SSLCertificateChainFile". For example:
SSLCertificateChainFile /etc/pki/tls/certs/chain.crt
-
Copy and paste the contents of the Intermediate CA into your CA chain file (append to chain.crt ).
-
Restart Apache httpd:
# service httpd restart
Two-way SSL (Client Authentication)
- Backup up all involved files before manipulating them.
- Locate the Apache configuration file where your Virtual Host is configured.
-
Locate the line "SSLCACertificateFile". For example:
SSLCACertificateFile /etc/httpd/conf/ssl.crt/my_ca.crt
-
Copy and paste the contents of the Intermediate CA into your CA cert (append to my_ca.crt ).
-
Restart Apache httpd:
# service httpd restart
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
1 Comments
So suppose i have an,
/etc/pki/tls/certs/sr-test-.crt, and then, i have an "CA.cer", i can read the first one the "crt" with cat on linux, and it has "-----BEGIN CERTIFICATE----- -----END CERTIFICATE-----", then i can read the content "cer" file whit this comand "openssl x509 -inform DER -in CA.cer -noout -text", then i need to copy all this output and paste it inside "sr-test-.crt" beetween "-----BEGIN CERTIFICATE----- -----END CERTIFICATE-----", and the restart my apache web server, this are the correct steps ?