按照網上說的,配置了 好幾遍,如圖先列一下目錄結構:
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 [email protected]
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
使用phpstudy的apache開啟ssl服務,通過https訪問網頁,拒絕請求,無法訪問
慕尼黑8549860
2019-03-11 07:05:25