phpstudy apache配置https

  1. 打開Apache的httpd.conf文件,
    php

  #LoadModule ssl_module modules/mod_ssl.so ,去掉該行前面的"#"符號
ide

2.在Apache的配置目錄conf下,新建配置文件,列如:hostsssl.conf文件,添加以下代碼ui

Listen 443spa

<VirtualHost *:443>orm

      SSLEngine onserver

      SSLProtocol all -SSLv2 -SSLv3ip

      SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5ssl


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

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

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

      DocumentRoot  "C:/wamp/www/dongba"

      <Directory />

         Options +Indexes +FollowSymLinks +ExecCGI

             AllowOverride All

                Order allow,deny

          Allow from all

        Require all granted

       </Directory>

</VirtualHost>

//其中這三個是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

相關文章
相關標籤/搜索