AH02565 수정 방법: 인증서와 개인 키가 일치하지 않습니다.

AH02565 수정 방법: 인증서와 개인 키가 일치하지 않습니다.

Ubuntu Apache 서버에 호스팅되는 애플리케이션이 있고 거기에 SSL 암호화가 설치되어 있습니다. 이제 Digicert 인증서로 Letsencrypt SSL 인증서를 변경하고 싶습니다. Digicert SSL 설치 문서를 따랐는데 Apache 서버를 시작하려고 하면 실패합니다. 오류 로그를 확인한 후 아래 오류를 발견했습니다.

AH02565: Certificate and private key urbaninspirations.biz:443:0 from /etc/cert/domain_name.crt and /etc/cert/domain_name.key do not match
AH00016: Configuration Failed

아래는 내 "000-default-le-ssl.conf" 페이지 스크립트입니다.

<VirtualHost *:443>
    ServerName domain_name.biz
    ServerAlias www.domain_name.biz
    SSLEngine On
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html
    
    ### This is using in Letsencrypt SSL certificates
    Include /etc/letsencrypt/options-ssl-apache.conf
    SSLCertificateFile /etc/letsencrypt/live/domain_name.biz/fullchain.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/domain_name.biz/privkey.pem

    ### Change this for DigiCert SSL certification but getting error when enable below line
    #SSLCertificateFile /etc/cert/domain_name.crt
    #SSLCertificateKeyFile /etc/cert/domain_name.key
    #SSLCertificateChainFile /etc/cert/DigiCertCA.crt
</VirtualHost>

내가 잘못하고 있는 것에 대해 올바른 방향을 알려줄 수 있는 사람이 있나요?

답변1

개인 키는 사용하는 인증서(공개 키)와 일치해야 합니다. 그렇지 않으면 함께 사용할 수 없습니다.

키와 인증서가 모두 일치하는지 확인하는 한 가지 방법(인증서는 사용 중인 개인 키에서 제공됨)은 openssl을 사용하여 모듈러스를 확인하는 것입니다.

openssl rsa -in file.key -noout -modulus

openssl x509 -in file.crt -noout -modulus

Note: If certificate or key are not in ASCII you must add "-inform DER" to the specific file.

두 명령의 출력은 동일해야 합니다.

관련 정보