[英]Subdomain forwarding to main domain on ssl requests only
以下是我編輯的ssl.conf的副本,以刪除所有標識信息。
當前,我們有一個通配符SSL證書,並計划使用此證書托管多個子域。 Apache確認這應該可行
目前,域2正在轉發到www,但是我不知道為什么。 為了縮小范圍,我從文件中完全刪除了www虛擬主機,然后重新部署。 重定向仍然發生(並且作為唯一的虛擬主機,它加載了domain2文件結構)
我不知道這種重定向在哪里發生。 證書是否可能有問題? (我確認證書上的通用名稱是* .example.com)
Listen ip-of-server:443
LoadModule ssl_module modules/mod_ssl.so
SSLPassPhraseDialog builtin
AcceptMutex flock
SSLSessionCache shmcb:/var/cache/mod_ssl/scache(512000)
SSLSessionCacheTimeout 300
SSLMutex default
SSLRandomSeed startup /dev/urandom 256
SSLRandomSeed connect builtin
NameVirtualHost ip-of-server:443
<VirtualHost ip-of-server:443>
SSLEngine on
SSLStrictSNIVHostCheck on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP
SSLCertificateFile /etc/apache/ssl/STAR.example.com.pem
SSLCertificateKeyFile /etc/pki/tls/private/example.com.key
ServerName "domain2.example.com"
DocumentRoot "/srv/www/domain2.example.com/public_html"
CustomLog "/srv/www/domain2.example.com/logs/access.log" combined
ErrorLog "/srv/www/domain2.example.com/logs/error.log"
<Directory /var/www/html>
AllowOverride none
Order Allow,Deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost ip-of-server:443>
SSLEngine on
SSLStrictSNIVHostCheck on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP
SSLCertificateFile /etc/apache/ssl/STAR.example.com.pem
SSLCertificateKeyFile /etc/pki/tls/private/example.com.key
ServerName "www.example.com"
DocumentRoot "/srv/www/www.example.com/public_html"
CustomLog "/srv/www/www.example.com/logs/access.log" combined
ErrorLog "/srv/www/www.example.com/logs/error.log"
<Directory /var/www/html>
AllowOverride none
Order Allow,Deny
Allow from all
</Directory>
</VirtualHost>
原來在某個時候,我們進行了301重定向,將domain2指向www。 谷歌瀏覽器chrome已緩存了301。在devtools打開的情況下禁用了緩存,導致頁面可以通過ssl正確加載。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.