httpd.conf文件中的这两行我改好了
LoadModule ssl_module modules/mod_ssl.so Include conf/extra/httpd-ssl.conf httpd-ssl.conf里面我改成这样 <VirtualHost *:443> DocumentRoot "D:/upupw/htdocs" ServerName localhost:443 ServerAlias 127.0.0.1 ServerAdmin webmaster@example.com DirectoryIndex index.html index.htm index.php default.php app.php u.php ErrorLog logs/example_error.log CustomLog logs/example_access.log \ "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" SSLEngine on SSLCertificateFile "D:/upupw/Apache2/conf/server.crt" SSLCertificateKeyFile "D:/upupw/Apache2/conf/server.key" SSLCertificateChainFile "D:/upupw/Apache2/conf/CA.crt" <FilesMatch "\.(shtml|phtml|php)$"> SSLOptions +StdEnvVars </FilesMatch> BrowserMatch "MSIE [2-5]" \ nokeepalive ssl-unclean-shutdown \ downgrade-1.0 force-response-1.0 </VirtualHost>现在是可以通过443端口访问网站,但是使用https访问chrome就说“SSL 连接出错" 证书是沃通的免费SSL证书,我已经将他们改名放置在conf文件夹下了。 请问我是哪里做错了吗? 服务器是阿里云的windows 2008 R2服务器 Apache PHP5.2系列环境 |
|
沙发#
发布于:2015-07-24 17:05
|
|
板凳#
发布于:2015-07-24 17:10
|
|
地板#
发布于:2015-07-24 17:28
|
|
4楼#
发布于:2015-07-24 17:43
|
|
5楼#
发布于:2015-07-24 22:27
我研究了一个晚上,自己解决啦
httpd-ssl.conf文件应该做出如下修改 <VirtualHost 域名:443> DocumentRoot "D:/upupw/htdocs" ServerName localhost:443 ServerAlias 127.0.0.1 ServerAdmin webmaster@chinancce.com DirectoryIndex index.html index.htm index.php default.php app.php u.php ErrorLog logs/example_error.log CustomLog logs/example_access.log \ "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" SSLEngine On SSLCertificateFile "D:/upupw/Apache2/conf/2_www.chinancce.com.crt" SSLCertificateKeyFile "D:/upupw/Apache2/conf/3_www.chinancce.com.key" SSLCertificateChainFile "D:/upupw/Apache2/conf/1_root_bundle.crt" <FilesMatch "\.(shtml|phtml|php)$"> SSLOptions +StdEnvVars </FilesMatch> BrowserMatch "MSIE [2-5]" \ nokeepalive ssl-unclean-shutdown \ downgrade-1.0 force-response-1.0 <Directory "D:/upupw/htdocs"> Options FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost> 特别是要加入这段 <Directory "D:/upupw/htdocs"> Options FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory>否则即使开启了https访问也会报403错误 |
|
6楼#
发布于:2015-08-06 15:13
搞了2周,终于实现全站HTTPS加密了
不支持HTTPS的资源用另一台服务器跑K版做反向代理变成HTTPS的。 实在不行的页面设置了例外并且用JS实现强制HTTP访问 |
|