我希望有人能夠幫助我。我有兩個IP可用於執行此操作,並需要在同一臺Apache服務器上託管兩個不同的安全(SSL)域。我已經閱讀了Apache 2.2的某些東西,可以使用單個IP,使用某種插件,但我希望儘可能簡單,並且願意使用兩個IP來完成此任務。我已經擁有了兩個域的簽名證書。在apache上託管多個SSL證書
這是我在這裏發佈的設置,但是我遇到的問題是當我訪問domain2.net時,收到瀏覽器警告,告知我該證書與域不匹配,但與domain1.com匹配
我正在使用CentOS 5和Apache 2.2.3。 CentOS的擁有的ssl.conf文件,這些線是什麼,我相信是給我找麻煩:
SSLCertificateFile /etc/pki/tls/certs/domain1.com.crt
SSLCertificateKeyFile /etc/pki/tls/private/domain1.com.key
我是,我可以在虛擬主機容器覆蓋這些值並引用我需要的按鍵的印象,但它看起來並不那樣。當我在ssl.conf文件中註釋這兩行時,Apache不會重新啓動。該ssl_log提示:SSLCertificateKeyFile
這是我的虛擬容器:
<VirtualHost 2.2.2.2:443>
SSLEngine on
SSLCertificateFile /etc/pki/tls/certs/domain2.net.crt
SSLCertificateKeyFile /etc/pki/tls/private/domain2.net.key
DocumentRoot "/var/www/domain2"
ServerName domain2.net
ServerAlias domain2.net
DirectoryIndex "index.php"
<Directory /var/www/html/domain2>
Options -Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost 1.1.1.1:444>
SSLEngine on
SSLCertificateFile /etc/pki/tls/certs/domain1.com.crt
SSLCertificateKeyFile /etc/pki/tls/private/domain1.com.key
DocumentRoot "/var/www/html"
ServerName domain1.com
ServerAlias domain1.com
DirectoryIndex "index.php"
<Directory /var/www/html>
Options -Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
我怎樣才能得到這兩個領域使用SSL來工作?我也試着爲不同的IP使用相同的端口,但是Apache不會重新啓動。
我真的迷失了,所以如果有人能伸出援手,我會非常感激。
這幫了我很多!我也有Apache給出兩個虛擬主機相同的證書。將ServerName更改爲每個虛擬主機獨有的解決方案!只是想確認這是否適用於下一個搜索此人的人 – Christian 2013-05-26 16:14:33