gpt4 book ai didi

ssl 通配子域 www.sub.domain.com

转载 作者:太空宇宙 更新时间:2023-11-03 12:57:24 28 4
gpt4 key购买 nike

我已经为 *.domain.com 购买了通配符 ssl 证书。我使用:

  • 为 ssl 证书启动 ssl 提供程序
  • Apache 虚拟主机

我希望每个请求都重定向到 HTTPS NO-WWW

我设法做到了:

  • http://sub.domain.com => https://domain.com 可以
  • http://www.sub.domain.com => https://sub.domain.com 可以<

但是

https://www.sub.domain.com => https://domain.com 不正常 (NET::ERR_CERT_COMMON_NAME_INVALID)

你能帮帮我吗?

<VirtualHost *:80>
ServerName sub.domain.com
Redirect permanent / https://sub.domain.com
</VirtualHost>
<VirtualHost *:80>
ServerName www.sub.domain.com
Redirect permanent / https://sub.domain.com
</VirtualHost>
Listen 443
<VirtualHost *:443>
ServerAdmin mail@domain.com
ServerName sub.domain.com
ServerAlias www.sub.domain.com
DocumentRoot /home/sub.domain.com
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/sub.domain.com>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
SSLEngine on
SSLProtocol all -SSLv2 -SSLv3
SSLCipherSuite ALL:!DH:!EXPORT:!RC4:+HIGH:+MEDIUM:!LOW:!aNULL:!eNULL
SSLCertificateFile /etc/ssl/2__.sub.domain.com.crt
SSLCertificateKeyFile /root/sub.domain.com.key
SSLCertificateChainFile /etc/ssl/1_root_bundle.crt
</VirtualHost>

最佳答案

*.domain.com(一级域子域)的通配符证书对 www.sub.domain.com(二级子域)无效。您将需要 *.sub.domain.com 的通配符证书。

参见 SSL Multilevel Subdomain Wildcard

关于ssl 通配子域 www.sub.domain.com,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37924467/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com