使用phpstudy的apache开启ssl服务,通过https访问网页,拒绝请求,无法访问
按照网上说的,配置了 好几遍,如图
先列一下目录结构:
D:phpStudyApache\
-bin
-cgi-bin
-conf
-logs
-modules
-conf
-extra
-httpd-ssl.conf
-ssl
-server.crt
-server.key
-httpd.conf
-openssl.cnf
-vhosts.conf
1. 已经安装网上说的,开启phpstudy的php_openssl
phpstudy>其他选项菜单>php扩展及设置>php扩展>php_openssl勾选
2. 修改httpd.conf,放开注释
Include conf/extra/httpd-mpm.conf
Include conf/extra/httpd-ssl.conf
Include conf/extra/httpd-php.conf
3. 修改extra/httpd-ssl.conf
# Listen 443
SSLPassPhraseDialog builtin
SSLSessionCache "shmcb:D:/phpStudy/Apache/ssl_scache(512000)"
SSLSessionCacheTimeout 300
NameVirtualHost *:443
SSLStrictSNIVHostCheck off
SSLCipherSuite AESGCM:ALL:!DH:!EXPORT:!RC4:+HIGH:!MEDIUM:!LOW:!aNULL:!eNULL
SSLProtocol all -SSLv2 -SSLv3
<VirtualHost *:443>
DocumentRoot "D:\WWW\app"
ServerName localhost
ServerAdmin admin@phpStudy.net
ErrorLog "D:/phpStudy/Apache/error.log"
TransferLog "D:/phpStudy/Apache/access.log"
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile "D:/phpStudy/Apache/conf/ssl/server.crt"
SSLCertificateKeyFile "D:/phpStudy/Apache/conf/ssl/server.key"
SSLCACertificateFile "D:/phpStudy/Apache/conf/ssl/ca-bundle.crt"
SSLVerifyClient require
SSLVerifyDepth 1
<FilesMatch "\.(cgi|shtml|phtml|php|html)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory "D:\WWW\app">
AllowOverride None
Options None
Require all granted
</Directory>
BrowserMatch ".*MSIE.*" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
CustomLog "D:/phpStudy/Apache/ssl_request.log" \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
</VirtualHost>
如果我打开# Listen 443,则又是报的另一个错误
那位大神指点指点啊。头一次搞https
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
把httpd-ssl.conf改成下面的,就行了。
具体的,就是把
注释掉
如图: