我正在运行 Ubuntu 20.04 服务器,我正在使用 Apache2,我使用 letsencrypt 和 certbot 来获取我的证书,并且成功了,我的网页是 bestwebpage.ddns.net,我通过 NOIP 获取我的域名,它配置为处理我的 ISP 阻止端口 80,我修改了我的 bestwebpage.ddns.net.conf,如下所示:
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName bestwebpage.ddns.net
ServerAlias www.bestwebpage.ddns.net
DocumentRoot /var/www/bestwebpage.ddns.net
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost *:443>
ServerName bestwebpage.ddns.net
DocumentRoot /var/www/bestwebpage.ddns.net
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/bestwebpage.ddns.net/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/bestwebpage.ddns.net/privkey.pem
</VirtualHost>
我还修改了 default-ssl.conf 如下:
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName bestwebpage.ddns.net:443
ServerAdmin webmaster@localhost
DocumentRoot /var/www/bestwebpage.ddns.net
ErrorLog ${APACHE_LOG_DIR}/bestwebpage.ddns.net-error.log
CustomLog ${APACHE_LOG_DIR}/bestwebpage.ddns.net-access.log combined
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/bestwebpage.ddns.net/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/bestwebpage.ddns.net/privkey.pem
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>
</VirtualHost>
</IfModule>
我无法安全地加载该页面。