at.com 重定向失败 无法为 at.com 设置增强重定向 SSL apache centos 7

at.com 重定向失败 无法为 at.com 设置增强重定向 SSL apache centos 7

我尝试使用 let's encrypt SSL 并使用 certbot 安装它certbot --apache -d at.com -d www.at.com -d destmap.at.com -d to.at.com。但不行。我收到此错误

Failed redirect for at.com
Unable to set enhancement redirect for at.com
Unable to find corresponding HTTP vhost; Unable to create one as intended addresses conflict; Current configuration does not support automated redirection

这是我在 /etc/httpd/conf/httpd.conf 中的虚拟主机

IncludeOptional conf.d/*.conf

<VirtualHost *:80>
       ServerName at.com
       ServerName www.at.com
       DocumentRoot /var/www/html/at

       <Directory /var/www/html/at>
              AllowOverride All
       </Directory>
</VirtualHost>

<VirtualHost *:80>
       ServerName destmap.at.com
       DocumentRoot /var/www/html/destmap

       <Directory /var/www/html/destmap>
           AllowOverride All
       </Directory>
</VirtualHost>

<VirtualHost *:80>
       ServerName to.at.com
       DocumentRoot /var/www/html/toa

       <Directory /var/www/html/toa>
              AllowOverride All
       </Directory>
</VirtualHost>
Include /etc/httpd/conf/httpd-le-ssl.conf

这是我在 /etc/httpd/conf/httpd-le-ssl.conf 中的虚拟主机

<IfModule mod_ssl.c>
<VirtualHost *:443>
       ServerName at.com
       DocumentRoot /var/www/html/at

       <Directory /var/www/html/at>
              AllowOverride All
       </Directory>
Include /etc/letsencrypt/options-ssl-apache.conf
ServerAlias www.at.com
SSLCertificateFile /etc/letsencrypt/live/at.com/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/at.com/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/at.com/chain.pem
</VirtualHost>
</IfModule>
<IfModule mod_ssl.c>
<VirtualHost *:443>
       ServerName destmap.at.com
       DocumentRoot /var/www/html/destmap
       <Directory /var/www/html/destmap>
              AllowOverride All
       </Directory>
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/at.com/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/at.com/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/at.com/chain.pem
</VirtualHost>
</IfModule>
<IfModule mod_ssl.c>
<VirtualHost *:443>
       ServerName to.at.com
       DocumentRoot /var/www/html/toa

       <Directory /var/www/html/toa>
              AllowOverride All
       </Directory>
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/at.com/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/at.com/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/at.com/chain.pem
</VirtualHost>
</IfModule>

相关内容