不兼容的服务器名称

不兼容的服务器名称

我使用 certbot 为我的域名 carmensteffens.us 安装了 Letsencrypt 证书,除了 Apple 设备(iOS 和 OSX)的浏览器(Chrome 和 Safari)之外,一切正常。

苹果设备中的浏览器显示:

证书无效(服务器名称不兼容)

我认为这是 apache (2.4.7) 中的虚拟主机错误

carmensteffens.us.conf (80)

<VirtualHost *:80>
        ServerName carmensteffens.us
        ServerAlias www.carmensteffens.us

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/web-v2/public_html

        ErrorLog /var/www/web-v2/logs/csusa_error.log
        CustomLog /var/www/web-v2/logs/csusa_access.log combined

        <Directory "/var/www/web-v2/public_html">
           Options All
           AllowOverride All
           Allow from all
        </Directory>

        Include /var/www/web-v2/public_html/public/assets/carmen/_default/directives.conf
        Include /var/www/web-v2/public_html/public/assets/carmen/us/directives.conf
        RewriteEngine on
        RewriteCond %{SERVER_NAME} =www.carmensteffens.us [OR]
        RewriteCond %{SERVER_NAME} =carmensteffens.us
        RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

carmensteffens.us.conf-le-ssl.conf (443)

<IfModule mod_ssl.c>
<VirtualHost *:443>
        ServerName carmensteffens.us
        ServerAlias www.carmensteffens.us

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/web-v2/public_html

        ErrorLog /var/www/web-v2/logs/csusa_error.log
        CustomLog /var/www/web-v2/logs/csusa_access.log combined

        <Directory "/var/www/web-v2/public_html">
           Options All
           AllowOverride All
           Allow from all
        </Directory>

        Include /var/www/web-v2/public_html/public/assets/carmen/_default/directives.conf
        Include /var/www/web-v2/public_html/public/assets/carmen/us/directives.conf
        SSLCertificateFile /etc/letsencrypt/live/carmensteffens.us/cert.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/carmensteffens.us/privkey.pem
        Include /etc/letsencrypt/options-ssl-apache.conf
        SSLCertificateChainFile /etc/letsencrypt/live/carmensteffens.us/chain.pem
</VirtualHost>
</IfModule>

有任何想法吗 ?

相关内容