mydomainname.com 无法使用 https
我创建了一个自签名 SSL 证书用于测试目的,并在我的虚拟主机文件中配置了生成的证书。但是,当我尝试使用 https://mydomainname.com 访问我的域时,它不起作用。 Mozilla给出错误页面
Firefox 无法建立连接 到 mydomainname.com 的服务器。
我有一台 Windows Vista 计算机,我的虚拟主机文件如下:
我的虚拟主机文件:
<IfDefine SSL>
<VirtualHost mydomainname.com:80>
#ServerName www.mydmainnamw.com:8080
#DocumentRoot "C:/.../My Company/My Sites/johnbokma.com/site/web"
#CustomLog logs/lc.johnbokma.com.access.log combined
#ErrorLog logs/lc.johnbokma.com.error.log
SSLEngine on
SSLCertificateFile C:/Program Files (x86)/ApacheSoftwareFoundation/conf/ssl.crt/server.crt
SSLCertificateKeyFile C:/Program Files (x86)/ApacheSoftwareFoundation/conf/ssl.key/server.key
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
CustomLog logs/ssl_request_log \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
</VirtualHost>
<IfDefine SSL>
I have created a self signed SSL Certificate for testing purpose and I have configured the generated certificate at my virtual hosts file. But when I tried to access my domain with https://mydomainname.com it's not working. Mozilla gives the error page
Firefox can't establish a connection
to the server at mydomainname.com.
I have a Windows Vista machine and my virtual hosts file is following:
my vitual hosts file:
<IfDefine SSL>
<VirtualHost mydomainname.com:80>
#ServerName www.mydmainnamw.com:8080
#DocumentRoot "C:/.../My Company/My Sites/johnbokma.com/site/web"
#CustomLog logs/lc.johnbokma.com.access.log combined
#ErrorLog logs/lc.johnbokma.com.error.log
SSLEngine on
SSLCertificateFile C:/Program Files (x86)/ApacheSoftwareFoundation/conf/ssl.crt/server.crt
SSLCertificateKeyFile C:/Program Files (x86)/ApacheSoftwareFoundation/conf/ssl.key/server.key
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
CustomLog logs/ssl_request_log \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
</VirtualHost>
<IfDefine SSL>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否启用了 ssl 并侦听正确的端口?
您应该使用 https 的默认端口 (443)
您的虚拟主机应该看起来像这样,(取消注释服务器名称部分)
Have you enabled ssl and listen to the right port?
You should use the default port for https (443)
Your virtual host should look something like this, (uncomment the servername part)