phpstudy下配置https证书

颁发证书后下载下来,我的网站是Apache集成配置的,所以我只用Apache文件下的文件就行了

image

1.找到Apache配置文件目录我的是user/local/apache/conf 打开httpd.conf文件 找到下面那段代码#LoadModule ssl_module modules/mod_ssl.so 去掉前面的#号,去掉注释启用这段代码

image

2.进入apache安装目录E:phpStudyPHPTutorialApache(请根据实际安装目录)下的conf文件夹,找到vhosts.conf文件,找到SSL证书绑定域名对应的HTTP配置,并在下方增加:


Listen 443



    DocumentRoot "D:\phpStudy\WWW\testBread\public"

    ServerName www.XXXX.cn

    ServerAlias XXXX.cn

    SSLEngine on

    SSLProtocol TLSv1 TLSv1.1 TLSv1.2

    SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5

    SSLCertificateFile "D:\phpStudy\Apache\cert\XXXX.cn.cer" 

    SSLCertificateKeyFile "D:\phpStudy\Apache\cert\XXXX.cn.key"

    SSLCertificateChainFile "D:\phpStudy\Apache\cert\XXXXX.cn_ca.crt"



      Options +Indexes +FollowSymLinks +ExecCGI

      AllowOverride All

      Order allow,deny

      Allow from all

      Require all granted

  


你可能感兴趣的:(phpstudy下配置https证书)