Certbot安装了两个let-encrypting SSL证书,但是没有起作用
在我的AWS EC2 Ubuntu 18上
三个文件如下:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =sub1.domain.net [OR]
RewriteCond %{SERVER_NAME} =sub2.domain.net
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
SSLEngine on
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
ServerName sub1.domain.net
Include /etc/letsencrypt/options-ssl-apache.conf
ServerAlias sub2.domain.net
SSLCertificateFile /etc/letsencrypt/live/sub1.domain.net/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/sub2.domain.net/privkey.pem
</VirtualHost>
</IfModule>
<IfModule mod_ssl.c>
<VirtualHost _default_:443>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>
</VirtualHost>
</IfModule>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
2018-12-21 04:51:46,545:DEBUG:certbot.reverter:Creating backup of /etc/apache2/sites-enabled/000-default-le-ssl.conf
2018-12-21 04:51:46,744:INFO:certbot_apache.configurator:Deploying Certificate to VirtualHost /etc/apache2/sites-enabled/000-default-le-ssl.conf
tcp6 0 0 :::443 :::* LISTEN 1529/apache2
tcp6 0 0 :::80 :::* LISTEN 1529/apache2
我尝试了一切,但外界找不到任何证书。 我没有在该文件中添加任何条目:/etc/apache2/apache2.conf
子域取自免费的DNS dynu点com