我们的网站已经运行了大约 2 个月。如果启用了 SSL,网站将无法再加载。我可以编辑 /etc/apache2/sites-enabled/wordpress 并删除 SSL 配置,网站将加载并监听 *:80 证书符合 SHA2 标准。
以下是我的配置文件
NameVirtualHost *:80
NameVirtualHost *:443
<VirtualHost *:80>
UseCanonicalName Off
ServerAdmin butlera at mehlvilleschooldistrict.net
DocumentRoot /var/www/wordpress
</VirtualHost>
<VirtualHost *:443>
SSLEngine on
SSLCertificateFile /etc/ssl/certs/prodev.cer
SSLCertificateKeyFile /etc/ssl/private/prodev.key
SSLCertificateChainFile /etc/ssl/certs/gd_bundle-g2.crt
ServerAdmin butlera at mehlvilleschooldistrict.net
ServerName my.server.address
ServerAlias http://www.my.server.address
DocumentRoot /var/www/wordpress
</VirtualHost>
<Directory /var/www/wordpress>
Options +FollowSymLinks
AllowOverride All
order allow,deny
allow from all
</Directory>
这是我的错误日志
[Mon Oct 03 17:53:39 2016] [info] Init: Seeding PRNG with 656 bytes of entropy
[Mon Oct 03 17:53:39 2016] [info] Loading certificate & private key of SSL-aware server
[Mon Oct 03 17:53:39 2016] [error] Init: Private key not found
[Mon Oct 03 17:53:39 2016] [error] SSL Library Error: 218529960 error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag
[Mon Oct 03 17:53:39 2016] [error] SSL Library Error: 218640442 error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error
[Mon Oct 03 17:53:39 2016] [error] SSL Library Error: 218529960 error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag
[Mon Oct 03 17:53:39 2016] [error] SSL Library Error: 218595386 error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error
[Mon Oct 03 17:53:39 2016] [error] SSL Library Error: 67710980 error:04093004:rsa routines:OLD_RSA_PRIV_DECODE:RSA lib
[Mon Oct 03 17:53:39 2016] [error] SSL Library Error: 218529960 error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag
[Mon Oct 03 17:53:39 2016] [error] SSL Library Error: 218595386 error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error
任何帮助将不胜感激
答案1
问题是该文件在-----BEGIN RSA PRIVATE KEY-----之前和之后都有空行,并且在-----END RSA PRIVATE KEY-----之前还有一个空行