关于phpstudy配置https问题

一、首先需要apache打开 openssl的拓展,
二、在Apache的安装目录下创建cert目录,并且将下载的全部文件拷贝到cert目录中
三、打开配置目录找到httpd.conf文件
四、在配置文件中搜索Include conf/vhosts.conf在这个语句下面添加Include conf/vhostssl.conf
五、在conf文件夹中创建名为vhostssl.conf的文件
文件中的内容如下(阿里云)

Listen 443

    DocumentRoot "D:\WWW\WEBMULU(这里填写你的需要指向的根目录)"

    ServerName www.example.com这里填写你的网址

    ServerAlias example.com这里填写你的网址

    SSLEngine on

    SSLProtocol TLSv1 TLSv1.1 TLSv1.2

    SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5

    SSLCertificateFile "D:\phpStudy\Apache\cert\public.pem"这里填写那个下载的文件里面的东西

    SSLCertificateKeyFile "D:\phpStudy\Apache\cert\21564852664745.key"把这个名字也改为下载的名字

    SSLCertificateChainFile "D:\phpStudy\Apache\cert\chain.pem"

  填写你需要指定的根目录)">

      Options +Indexes +FollowSymLinks +ExecCGI

      AllowOverride All

      Order allow,deny

      Allow from all

      Require all granted

 

Listen 443(腾讯云)

    DocumentRoot "C:\phpstudy\WWW"
    ServerName www.denglong.net.cn
    ServerAlias denglong.net.cn
    SSLEngine on
    SSLProtocol TLSv1 TLSv1.1 TLSv1.2
    SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
    SSLCertificateFile "c:\phpStudy\Apache\cert\2_denglong.net.cn.crt"
    SSLCertificateKeyFile "c:\phpStudy\Apache\cert\3_denglong.net.cn.key"
    
 
      Options +Indexes +FollowSymLinks +ExecCGI
      AllowOverride All
      Order allow,deny
      Allow from all
      Require all granted
 

 
 
 
完成以上操作后即可重启
那么重点来了  如果你的apache启动不起来了    那么检查443端口是否被占用!!!!!!!!!!!!!!!!!!!
 

你可能感兴趣的:(关于phpstudy配置https问题)