phpstudy集成环境配置https

第一步:修改apache目录下的httpd.conf配置文件

1、#LoadModule ssl_module modules/mod_ssl.so删除行首的配置语句注释符号“#”

2、增加一条引用语句   Include conf/vhostssl.conf

1、在conf文件夹中创建一个vhostssl.conf配置文件。

2、编辑vhostsssl.conf文件,增加如下内容:

Listen 443


<VirtualHost *:443>


    DocumentRoot "网站根目录"


    ServerName www.***.com


    ServerAlias www.****.com


    SSLEngine on


    SSLProtocol TLSv1 TLSv1.1 TLSv1.2


    SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5


    SSLCertificateFile "C:\Windows\PHPStudy\Apache\cert\2_www****.com.crt"


    SSLCertificateKeyFile "C:\Windows\PHPStudy\Apache\cert\3_www.*****.com.key"


    SSLCertificateChainFile "C:\Windows\PHPStudy\Apache\cert\1_root_bundle.crt"


  <Directory "网站根目录">


      Options +Indexes +FollowSymLinks +ExecCGI


      AllowOverride All


      Order allow,deny


      Allow from all


      Require all granted


  </Directory>


</VirtualHost>

其中

SSLCertificateFile 是指证书公钥

SSLCertificateKeyFile   是指证书私钥

DocumentRoot  "D:\phpStudy\WWW"这是网站路径根据自己的

这是只是完成一半如果启动成功,那你就可以使用了

点击打开链接


猜你喜欢

转载自blog.csdn.net/php12345679/article/details/80525898