收到 www 域名不安全警告

收到 www 域名不安全警告

我安装了 lets encrypt 使用 certbot 当我去www.域名.com我收到此网站不安全的错误

Found the following certs:
  Certificate Name: example.com
    Domains: example.com
    Expiry Date: 2023-05-25 15:01:00+00:00 (VALID: 70 days)
    Certificate Path: /etc/letsencrypt/live/example.com/fullchain.pem
    Private Key Path: /etc/letsencrypt/live/example.com/privkey.pem
  Certificate Name: www.example.com
    Domains: www.example.com
    Expiry Date: 2023-06-13 16:14:03+00:00 (VALID: 89 days)
    Certificate Path: /etc/letsencrypt/live/www.example.com/fullchain.pem
    Private Key Path: /etc/letsencrypt/live/www.example.com/privkey.pem

Apache SSL 配置文件

<VirtualHost *:443>
ServerName example.com
    ServerAlias www.example.com
    DocumentRoot /var/www/example/public_html/public
SSLEngine                on
<Directory /var/www/example/public_html/public>
         Options +FollowSymLinks
         DirectoryIndex index.php
         AllowOverride All
         Require all granted
         Order allow,deny
         Allow from all
     </Directory>
SSLCertificateFile       /etc/letsencrypt/live/example.com/fullchain.pem
SSLCertificateKeyFile    /etc/letsencrypt/live/example.com/privkey.pem
Include  /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>

我怎样才能让它也适用于 www 域名?

答案1

您需要获取一份具有正确主题备用名称的证书。

您可以删除www.example.comexample.com证书,然后请求新的example.com wwww.example.com

相关内容