AH02579:Init:未找到私钥 - SSL apache2 ubuntu 16

时间:2017-12-20 10:01:37

标签: linux apache ubuntu ssl

与ssl有一些问题。第一次在linux上安装它。我可以用Windows轻松完成。但linux我很难过。

我当前的服务器

OS: Ubuntu 16.04
RAM: 2GB
Web Server: Apache2

error.log文件位于

之下
[Wed Dec 20 11:47:49.557544 2017] [ssl:error] [pid 3722] AH02579: Init: Private key not found
[Wed Dec 20 11:47:49.557627 2017] [ssl:error] [pid 3722] SSL Library Error: error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag
[Wed Dec 20 11:47:49.557648 2017] [ssl:error] [pid 3722] SSL Library Error: error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error
[Wed Dec 20 11:47:49.557663 2017] [ssl:error] [pid 3722] SSL Library Error: error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag
[Wed Dec 20 11:47:49.557678 2017] [ssl:error] [pid 3722] SSL Library Error: error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error (Type=RSA)
[Wed Dec 20 11:47:49.557693 2017] [ssl:error] [pid 3722] SSL Library Error: error:04093004:rsa routines:OLD_RSA_PRIV_DECODE:RSA lib
[Wed Dec 20 11:47:49.557706 2017] [ssl:error] [pid 3722] SSL Library Error: error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag
[Wed Dec 20 11:47:49.557721 2017] [ssl:error] [pid 3722] SSL Library Error: error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error (Type=PKCS8_PRIV_KEY_INFO)
[Wed Dec 20 11:47:49.557938 2017] [ssl:emerg] [pid 3722] AH02311: Fatal error initialising mod_ssl, exiting. See /var/log/apache2/error.log for more information
[Wed Dec 20 11:47:49.557950 2017] [ssl:emerg] [pid 3722] AH02564: Failed to configure encrypted (?) private key crm.ngm-inc.com:443:0, check /internalsites/certs/mycsr.csr
AH00016: Configuration Failed

这是siltes enable / available

中的default-ssl.conf
<IfModule mod_ssl.c>
    <VirtualHost *:443>
        # Admin Email
        ServerAdmin myemail@domain.com

        # Document Location of site
        DocumentRoot "/mysslsites/site1"
        ServerName subdomain.mydomain.com

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


        SSLEngine on

        SSLCertificateFile  /internalsites/certs/mycert.crt
        SSLCertificateKeyFile /internalsites/certs/mycsr.csr


        SSLCertificateChainFile /internalsites/certs/gd_bundle-g2-g1.crt


        <FilesMatch "\.(cgi|shtml|phtml|php)$">
                SSLOptions +StdEnvVars
        </FilesMatch>
        <Directory /usr/lib/cgi-bin>
                SSLOptions +StdEnvVars
        </Directory>


    </VirtualHost>
</IfModule>

命令我已经运行

#enable SSL
sudo a2enmod ssl
# create the symlink between available and enabled
sudo a2ensite default-ssl
# restart the service of apache to have changes take affect
sudo service apache2 restart

有些方面指出

  1. mycsr.csr - 来自我的IIS服务器,我从
  2. 生成密钥
  3. mycert.crt - 被命名为godaddy的加密名称
  4. 当它来到SSL和APACHE2时,我是一个完整的NOOB

0 个答案:

没有答案