Как установить сертификат SSL в Apache2?

Я довольно новичок в этом сообществе, и я надеюсь, что поставил свой вопрос в нужное место.

Я купил этот SSL-сертификат, который поставляется с четырьмя файлами, названными так:

AddTrustExternalCARoot.crt COMODORSAAddTrustCA.crt COMODORSADomainValidationSecureServerCA.crt mydomain_com

Следуя SSL-сертификату , я получаю эту ошибку:

* Restarting web server apache2                                                                                
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. 
Set the 'ServerName' directive globally to suppress this message
Action 'start' failed.

So моя служба apache2 даже не запускается.

Вот что я сделал в /etc/apache2/sites-available/default-ssl.conf:


    
        ServerAdmin admin@mydomain.com
        ServerName mydomain.com
        ServerAlias www.mydomain.com
        DocumentRoot /var/www/html

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        SSLEngine on

        SSLCertificateFile  /etc/apache2/ssl/mydomain_com.ca-bundle.crt
        SSLCertificateKeyFile /etc/apache2/ssl/mydomain.key

        
                SSLOptions +StdEnvVars
        
        
                SSLOptions +StdEnvVars
        

        BrowserMatch "MSIE [2-6]" \
                nokeepalive ssl-unclean-shutdown \
                downgrade-1.0 force-response-1.0
        BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown

    

После того, как я сделал эти изменения и попытался перезапустить службу apache, я получил ошибка, показанная выше. Это единственные изменения, которые я сделал. Я не изменил ничего другого.

Вот отчет журнала ошибок:

[Wed Jul 01 16:05:47.436945 2015] [mpm_prefork:notice] [pid 10568] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.9 OpenSSL/1.0.1f configured -- resuming normal operations
[Wed Jul 01 16:05:47.436988 2015] [core:notice] [pid 10568] AH00094: Command line: '/usr/sbin/apache2'
[Wed Jul 01 16:17:27.699364 2015] [mpm_prefork:notice] [pid 10568] AH00169: caught SIGTERM, shutting down
[Wed Jul 01 16:17:28.754414 2015] [ssl:warn] [pid 10729] AH01906: RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Wed Jul 01 16:17:28.754465 2015] [ssl:warn] [pid 10729] AH01909: RSA certificate configured for mydomain.com:443 does NOT include an ID which matches the server name
[Wed Jul 01 16:17:28.754485 2015] [ssl:emerg] [pid 10729] AH02238: Unable to configure RSA server private key
[Wed Jul 01 16:17:28.754510 2015] [ssl:emerg] [pid 10729] SSL Library Error: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch
[Wed Jul 01 16:17:28.754514 2015] [ssl:emerg] [pid 10729] AH02311: Fatal error initialising mod_ssl, exiting. See /var/log/apache2/error.log for more information
[Wed Jul 01 16:20:56.686346 2015] [ssl:warn] [pid 10920] AH01906: RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Wed Jul 01 16:20:56.686411 2015] [ssl:warn] [pid 10920] AH01909: RSA certificate configured for mydomain.com:443 does NOT include an ID which matches the server name
[Wed Jul 01 16:20:56.686425 2015] [ssl:emerg] [pid 10920] AH02238: Unable to configure RSA server private key
[Wed Jul 01 16:20:56.686441 2015] [ssl:emerg] [pid 10920] SSL Library Error: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch
[Wed Jul 01 16:20:56.686446 2015] [ssl:emerg] [pid 10920] AH02311: Fatal error initialising mod_ssl, exiting. See /var/log/apache2/error.log for more information
[Wed Jul 01 16:46:22.422767 2015] [ssl:warn] [pid 11024] AH01906: RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Wed Jul 01 16:46:22.422831 2015] [ssl:warn] [pid 11024] AH01909: RSA certificate configured for mydomain.com:443 does NOT include an ID which matches the server name
[Wed Jul 01 16:46:22.422844 2015] [ssl:emerg] [pid 11024] AH02238: Unable to configure RSA server private key
[Wed Jul 01 16:46:22.422858 2015] [ssl:emerg] [pid 11024] SSL Library Error: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch
[Wed Jul 01 16:46:22.422862 2015] [ssl:emerg] [pid 11024] AH02311: Fatal error initialising mod_ssl, exiting. See /var/log/apache2/error.log for more information

Если это важно, я сгенерировал свой ключ с помощью openssl.

[d15 ] Обратите внимание, что я заменил свое настоящее доменное имя и адрес mydomain.com для этого вопроса.

Можете ли вы дать мне пошаговое руководство, как установить этот сертификат на Ubuntu 14.04 с apache2.

1
задан 1 July 2015 в 16:57

0 ответов

Другие вопросы по тегам:

Похожие вопросы: