【发布时间】:2017-09-16 00:31:04
【问题描述】:
由于这是一个敏感的客户项目,我所说的域名的所有使用都被替换为“example.com”。
我正在管理一个最近过期的 Let's Encrypt 证书的公共网站。所以我按照 DigitalOcean 教程here 并使用certbot-auto renew 更新证书(是的,我后来运行了sudo service apache2 reload)。它起作用了,但问题是该站点现在同时提供新证书和过期证书,并且似乎发生了随机选择。有时该站点受到浏览器的信任,因为它收到了新的证书,有时浏览器会拒绝过期的证书。即使通过SSL Labs analyzer 运行该站点,有时也会给出 A 级,有时会失败。
当我的配置显式仅包含新证书时,可能会导致继续使用这两个证书的原因是什么?我很困惑。
现在运行 certbot-auto renew 会得到这个结果:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
-------------------------------------------------------------------------------
Processing /etc/letsencrypt/renewal/example.com.conf
-------------------------------------------------------------------------------
Cert not yet due for renewal
The following certs are not due for renewal yet:
/etc/letsencrypt/live/example.com/fullchain.pem (skipped)
No renewals were attempted
Apache 启用站点的目录如下所示:
000-default.conf 000-default-le-ssl.conf
每个的配置如下:
000-default.conf
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
<Directory /var/www/html/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =example.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
000-default-le-ssl.conf
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
<Directory /var/www/html/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLCertificateFile /etc/letsencrypt/live/example.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
ServerName example.com
</VirtualHost>
</IfModule>
【问题讨论】:
标签: apache ssl https ubuntu-14.04 lets-encrypt