SSL证书安装出错

时间:2016-07-13 06:52:31

标签: ssl ssl-certificate

我正在尝试安装SSL证书,但在我尝试重新启动服务的最后一步陷入困境。我在.conf文件中做了哪些错误需要修复?

此外,.key文件是我在生成.csr文件时生成的文件,而.crt文件由godaddy提供。

<VirtualHost *:443>
<Directory /var/www/html>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
</Directory>
        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.
        #ServerName www.example.com
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html
ServerName mydomain.net
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/b1ea8634211f5783.crt
SSLCertificateKeyFile /etc/apache2/ssl/pride.key
SSLCertificateChainFile /etc/apache2/ssl/gd_bundle-g2-g1.crt

        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

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

        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf
</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
~                                                                                                                
~                                                                                                                
~                                                                                                                
~       

当我尝试重新启动时,这是我得到的错误:

root@ip-172-31-18-132:/etc/apache2/sites-available# service apache2 restart
 * Restarting web server apache2                                                       Action 'start' failed.
The Apache error log may have more information.
                                                                                [fail]
 * The apache2 instance did not start within 20 seconds. Please read the log files to discover problems

这是我无法理解的错误报告(/var/log/apache2/error.log):(

[Wed Jul 13 01:30:07.883524 2016] [negotiation:error] [pid 4631] [client 208.43.225.85:59294] AH00687: Negotiation: discovered file(s) matching request: /var/www/html/robots.txt (None could be negotiated).
[Wed Jul 13 04:04:45.397728 2016] [mpm_prefork:notice] [pid 1106] AH00169: caught SIGTERM, shutting down
[Wed Jul 13 04:07:06.602576 2016] [mpm_prefork:notice] [pid 1111] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.16 configured -- resuming normal operations
[Wed Jul 13 04:07:06.603747 2016] [core:notice] [pid 1111] AH00094: Command line: '/usr/sbin/apache2'
[Wed Jul 13 04:07:18.517316 2016] [mpm_prefork:notice] [pid 1111] AH00169: caught SIGTERM, shutting down
[Wed Jul 13 04:08:04.956660 2016] [mpm_prefork:notice] [pid 1110] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.16 configured -- resuming normal operations
[Wed Jul 13 04:08:04.956972 2016] [core:notice] [pid 1110] AH00094: Command line: '/usr/sbin/apache2'
[Wed Jul 13 05:20:12.959241 2016] [mpm_prefork:notice] [pid 1110] AH00169: caught SIGTERM, shutting down
[Wed Jul 13 05:20:14.005134 2016] [mpm_prefork:notice] [pid 1728] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.16 OpenSSL/1.0.1f configured -- resuming normal operations
[Wed Jul 13 05:20:14.006303 2016] [core:notice] [pid 1728] AH00094: Command line: '/usr/sbin/apache2'
[Wed Jul 13 05:38:00.707922 2016] [negotiation:error] [pid 1734] [client 66.249.66.184:54015] AH00687: Negotiation: discovered file(s) matching request: /var/www/html/robots.txt (None could be negotiated).
[Wed Jul 13 06:43:08.323954 2016] [mpm_prefork:notice] [pid 1728] AH00169: caught SIGTERM, shutting down
[Wed Jul 13 06:43:09.353465 2016] [ssl:emerg] [pid 3180] AH02238: Unable to configure RSA server private key
[Wed Jul 13 06:43:09.353512 2016] [ssl:emerg] [pid 3180] SSL Library Error: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch
[Wed Jul 13 06:43:09.353516 2016] [ssl:emerg] [pid 3180] AH02311: Fatal error initialising mod_ssl, exiting. See /var/log/apache2/error.log for more information
[Wed Jul 13 06:44:36.376515 2016] [ssl:emerg] [pid 3257] AH02238: Unable to configure RSA server private key
[Wed Jul 13 06:44:36.376562 2016] [ssl:emerg] [pid 3257] SSL Library Error: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch
[Wed Jul 13 06:44:36.376566 2016] [ssl:emerg] [pid 3257] AH02311: Fatal error initialising mod_ssl, exiting. See /var/log/apache2/error.log for more information
[Wed Jul 13 06:47:16.718509 2016] [mpm_prefork:notice] [pid 3329] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.16 OpenSSL/1.0.1f configured -- resuming normal operations
[Wed Jul 13 06:47:16.718543 2016] [core:notice] [pid 3329] AH00094: Command line: '/usr/sbin/apache2'

0 个答案:

没有答案