[問題] SSL多網域,都指向第一個VirtualHost
小妹在httpd設定的兩組網域
但當我輸入第二組網址https://www.b.com/時
會顯示憑證只對 *.a.com 有效,新增為例外網站後
網站內容會顯示https://www.a.com/的網站
看似都指向到了第一組VirtualHost
嘗試把第一組跟第二組VirtualHost互調位子,結果會反過來變成第一組網址失效
解了好久始終沒有解決....還請大大們幫幫小妹....
NameVirtualHost *:443
<VirtualHost *:443>
DocumentRoot "C:/web/a"
ServerName *.a.com
ServerAdmin *.a.com
SSLEngine on
SSLProtocol all -SSLv2
SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
SSLCertificateFile "C:/test/apache/conf/ssl.crt/certificate.crt"
SSLCertificateKeyFile "C:/test/apache/conf/ssl.crt/private.key"
SSLCACertificateFile "C:/test/apache/conf/ssl.crt/ca_bundle.crt"
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory "C:/web/a">
Options FollowSymLinks
AllowOverride All
SSLOptions +StdEnvVars
RewriteEngine on
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(.*)?$ https://%{SERVER_NAME}
</Directory>
</VirtualHost>
<VirtualHost *:443>
ServerName *.b.com
ServerAdmin *.b.com
DocumentRoot "C:/web/b"
SSLEngine on
SSLProtocol all -SSLv2
SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
SSLCertificateFile "C:/test/apache/conf/ssl.crt/certificate2.crt"
SSLCertificateKeyFile "C:/test/apache/conf/ssl.crt/private2.key"
SSLCACertificateFile "C:/test/apache/conf/ssl.crt/ca_bundle2.crt"
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory "C:/web/b">
Options FollowSymLinks
AllowOverride All
SSLOptions +StdEnvVars
RewriteEngine on
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(.*)?$ https://%{SERVER_NAME}
</Directory>
</VirtualHost>
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 122.116.52.39
※ 文章網址: https://www.ptt.cc/bbs/Web_Design/M.1551936778.A.BE9.html
→
03/07 17:43,
5年前
, 1F
03/07 17:43, 1F
→
03/07 20:56,
5年前
, 2F
03/07 20:56, 2F
→
03/07 20:56,
5年前
, 3F
03/07 20:56, 3F
→
03/07 22:43,
5年前
, 4F
03/07 22:43, 4F
Web_Design 近期熱門文章
PTT數位生活區 即時熱門文章