SSL on Apache HTTP Server

前端 未结 3 1146
眼角桃花
眼角桃花 2021-01-29 00:35

I have 2 crt files for Apache server:

  • 1_root_bundle.crt
  • 2_my_domain_name.com.crt

And other bundle:

  • 1_Intermediate.crt
  • <
3条回答
  •  闹比i
    闹比i (楼主)
    2021-01-29 00:48

    It is missing the key file with your certificate private key. Usually it has the .key extension like 2_my_domain_name.com.key and the file content starts with -----BEGIN PRIVATE KEY-----

    You configuration should looks like this

    SSLEngine on
    SSLCertificateFile      /etc/apache2/ssl/2_my_domain_name.com.crt
    SSLCertificateKeyFile   /etc/apache2/ssl/2_my_domain_name.com.key
    SSLCertificateChainFile /etc/apache2/ssl/1_root_bundle.crt
    

    The SSLCertificateChainFile points to a all-in-one file where you can assemble the certificates of Certification Authorities (CA) which form the certificate chain of the server certificate.

    So ensure that 1_root_bundle.crt contains 1_Intermediate.crt content and is in PEM format (base64 with --- BEGIN CERTIFICATE --- ----END CERTIFICATE--- headers)

    If you use apache >= 2.4.8 you could also concatenate all certificates in the file pointed at SSLCertificateFile

    SSLCertificateChainFile became obsolete with version 2.4.8, when SSLCertificateFile was extended to also load intermediate CA certificates from the server certificate file.

提交回复
热议问题