我有以下虚拟主机配置:
listen 80
listen 443
servername "example.com"
serveradmin "email@example.com"
namevirtualhost *:80
namevirtualhost *:443
directoryindex index.html index.php
options -indexes -multiviews +followsymlinks
<directory /Volumes/dev1/http>
allowoverride all
</directory>
<virtualhost *:80 *:443>
servername example.com
serveralias www.example.com
documentroot "/Volumes/dev1/http/example"
rewriteengine on
SSLCertificateFile "/Volumes/dev1/ssl/_ssl-cert.crt"
SSLCertificateKeyFile "/Volumes/dev1/ssl/_ssl-privatekey.crt"
SSLCertificateChainFile "/Volumes/dev1/ssl/_ssl-csr.crt"
</virtualhost>
当然example.com
只是一个……例子。
如果我访问一切都很好http://example.com
,但是如果我尝试访问HTTPS
我得到的版本
Safari can’t open the page “https://example.com/” because Safari
can’t establish a secure connection to the server “example.com”.
这些_ssl*
文件都已就位并httpd -t
从终端返回运行Syntax OK
。
我究竟做错了什么?谢谢!