我已經爲* .domain.com提供了通配符ssl certificat。 我用:用於SSL certificatssl通配符子域www.sub.domain.com
- startssl如果提供商
- Apache的虛擬主機
我想每個請求重定向到HTTPS NO-WWW
我成功地做到這一點:
- http://sub.dom ain.com =>HTTPS://domain.com是確定
- HTTP:// WWW .sub.domain.com =>HTTPS://sub.domain.com是確定
BUT
HTTPS://www.sub.domain.com =>HTTPS://domain.com不是OK(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 [email protected]
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>
哇,它變得非常昂貴...謝謝! 因此,可以在同一臺服務器上擁有多個通配符證書。 –