[問題] SSL多網域,都指向第一個VirtualHost

看板Web_Design作者 (shen)時間5年前 (2019/03/07 13:32), 編輯推噓0(004)
留言4則, 3人參與, 5年前最新討論串1/1
小妹在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 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
文章代碼(AID): #1SWAqAlf (Web_Design)
文章代碼(AID): #1SWAqAlf (Web_Design)