我tm竟然搞了一下午 最终原因是因为443 端口被 SVN服务器 占用了 好吧 我傻逼了 记住了 一定要查看端口是否被占用 太深刻了这次 !!!
1:打开PHPstudy php扩展设置,在php_openssl上点击打钩
2:打开修改httpd.conf配置文件,打开找到 #LoadModule ssl_module modules/mod_ssl.so,(保证前面没有#号去掉前面的注释符),使得ssl模块生效。
3:新建 文件 vhostssh.conf
4:在httpd.conf 内引入新建的文件 Include conf/vhostssh.conf 然后编辑新建的文件 内容为下:
Listen 443
<VirtualHost *:443>
??? DocumentRoot "C:\PerfLogs\phpstudy\PHPTutorial\WWW\aysm\appserver\public"
??? ServerName www.demo.com
??? SSLEngine on
??? SSLProtocol TLSv1 TLSv1.1 TLSv1.2
??? SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
??? SSLCertificateFile "C:\PerfLogs\phpstudy\PHPTutorial\Apache\conf\ssl\2_www.demo.com.crt"
??? SSLCertificateKeyFile "C:\PerfLogs\phpstudy\PHPTutorial\Apache\conf\ssl\3_www.demo.com.key"
??? SSLCertificateChainFile "C:\PerfLogs\phpstudy\PHPTutorial\Apache\conf\ssl\1_root_bundle.crt"
</VirtualHost>
<Directory "C:\PerfLogs\phpstudy\PHPTutorial\WWW\aysm\appserver\public">
?
? Options +Indexes +FollowSymLinks +ExecCGI
?
? Require all granted
????? AllowOverride All
????? Order allow,deny
????? Allow from all
</Directory>
5:编写.htaccess 文件
Phpstudy apache2.4 配置 https
原文地址:https://www.cnblogs.com/gjh99/p/10793722.html