phpstudyapache配置https

  1. 打开Apache的httpd.conf文件,

    网站建设哪家好,找成都创新互联公司!专注于网页设计、网站建设、微信开发、成都微信小程序、集团企业网站建设等服务项目。为回馈新老客户创新互联还提供了龙州免费建站欢迎大家使用!

  #LoadModule ssl_module modules/mod_ssl.so ,去掉该行前面的"#"符号

2.在Apache的配置目录conf下,新建配置文件,列如:hostsssl.conf文件,添加如下代码

Listen 443

      SSLEngine on

      SSLProtocol all -SSLv2 -SSLv3

      SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5

      SSLCertificateFile "C:/phpStudy/Apache/conf/ssl/server.crt"

      SSLCertificateKeyFile "C:/phpStudy/Apache/conf/ssl/server.key"

      SSLCertificateChainFile "C:/phpStudy/Apache/conf/ssl/ca-bundle.crt"

      DocumentRoot  "C:/wamp/www/dongba"

     

         Options +Indexes +FollowSymLinks +ExecCGI

             AllowOverride All

                Order allow,deny

          Allow from all

        Require all granted

       

//其中这三个是ssl证书,需对应到实际的路径

      SSLCertificateFile "C:/phpStudy/Apache/conf/ssl/server.crt"

      SSLCertificateKeyFile "C:/phpStudy/Apache/conf/ssl/server.key"

      SSLCertificateChainFile "C:/phpStudy/Apache/conf/ssl/ca-bundle.crt"

3.将hostsssl.conf文件包含到httd.conf配置文件中,在httpd.conf文件中添加如下一行

Include conf/vhostsssl.conf


网站名称:phpstudyapache配置https
文章网址:http://scyanting.com/article/gpdhjg.html