phpStudy安装SSL证书实现https链接

2019-05-0514:35:23服务器及运维Comments3,392 views字数 1735阅读模式

(1)phpstudy下载:文章源自菜鸟学院-https://www.cainiaoxueyuan.com/yunwei/11706.html

(2)phpstudy集成环境下正常运行的网站文章源自菜鸟学院-https://www.cainiaoxueyuan.com/yunwei/11706.html

(3)避免意外请先备份(复制)好配置文件文章源自菜鸟学院-https://www.cainiaoxueyuan.com/yunwei/11706.html

【开始】文章源自菜鸟学院-https://www.cainiaoxueyuan.com/yunwei/11706.html

(1)开启apache的编译ssl模块,如图打开phpstudy—其它选项设置—PHP扩张及设置—php扩展—php-openssl前面打勾文章源自菜鸟学院-https://www.cainiaoxueyuan.com/yunwei/11706.html

phpStudy安装SSL证书实现https链接文章源自菜鸟学院-https://www.cainiaoxueyuan.com/yunwei/11706.html

(2)如图点击打开修改配置文件,打开找到#LoadModule ssl_module modules/,去掉前面的注释符#(保证前面没有#号),使得ssl模块生效。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/yunwei/11706.html

在下面新增加一条引用语句(注意此处和第3步新建的文件名要匹配) :文章源自菜鸟学院-https://www.cainiaoxueyuan.com/yunwei/11706.html

LoadModule ssl_module modules/ 
Include conf/

phpStudy安装SSL证书实现https链接文章源自菜鸟学院-https://www.cainiaoxueyuan.com/yunwei/11706.html

(图 打开方法)文章源自菜鸟学院-https://www.cainiaoxueyuan.com/yunwei/11706.html

phpStudy安装SSL证书实现https链接文章源自菜鸟学院-https://www.cainiaoxueyuan.com/yunwei/11706.html

(图 添加好信息效果)文章源自菜鸟学院-https://www.cainiaoxueyuan.com/yunwei/11706.html

(3)依次打开phpstudy安装文件,打开Apache打开conf文件,在conf文件夹 中创建一个名为的配置文件。编辑文件,增加如下内容:文章源自菜鸟学院-https://www.cainiaoxueyuan.com/yunwei/11706.html

图 新建的:文件位置、效果图示:文章源自菜鸟学院-https://www.cainiaoxueyuan.com/yunwei/11706.html

phpStudy安装SSL证书实现https链接文章源自菜鸟学院-https://www.cainiaoxueyuan.com/yunwei/11706.html

使用说明版(仅做说明,需修改后才能用):文章源自菜鸟学院-https://www.cainiaoxueyuan.com/yunwei/11706.html

Listen 443
SSLStrictSNIVHostCheck off
SSLCipherSuite AESGCM:ALL:!DH:!EXPORT:!RC4:+HIGH:!MEDIUM:!LOW:!aNULL:!eNULL
SSLProtocol all -SSLv2 -SSLv3
<VirtualHost *:443>
    DocumentRoot "D:\phpStudy\WWW\bbs" #(网站根目录路径)
    ServerName www.yuming.com          #(更换成自己的域名)
    ServerAlias yuming.com              #(更换成自己的域名)
  <Directory "D:\phpStudy\WWW\bbs">   #(网站根目录路径)
      Options FollowSymLinks ExecCGI
      AllowOverride All
      Order allow,deny
      Allow from all
      Require all granted
  </Directory>
SSLEngine on
SSLCertificateFile "D:\phpStudy\Apache\conf\ssl\"  #(证书路径)
SSLCertificateKeyFile "D:\phpStudy\Apache\conf\ssl\"  #(证书路径)
</VirtualHost>

★ 实例版 a)软件版本phpStudyLite 2014; b)本地版网站; c)证书实际后缀名有变:cer变crt ; d) 所有路径要结合实际,即使有一点点错,也将导致Apache无法启动,务必仔细;文章源自菜鸟学院-https://www.cainiaoxueyuan.com/yunwei/11706.html

Listen 443
SSLStrictSNIVHostCheck off
SSLCipherSuite AESGCM:ALL:!DH:!EXPORT:!RC4:+HIGH:!MEDIUM:!LOW:!aNULL:!eNULL
SSLProtocol all -SSLv2 -SSLv3
<VirtualHost *:443>
    DocumentRoot "D:\phpStudyLite\WWW"
    ServerName 127.0.0.1
    ServerAlias 127.0.0.1
  <Directory "D:\phpStudyLite\WWW">
      Options FollowSymLinks ExecCGI
      AllowOverride All
      Order allow,deny
      Allow from all
      Require all granted
  </Directory>
SSLEngine on
SSLCertificateFile "D:\phpStudyLite\Apache\conf\ssl\"
SSLCertificateKeyFile "D:\phpStudyLite\Apache\conf\ssl\"
</VirtualHost>

最后打开网站加上https:// 即可看到效果:文章源自菜鸟学院-https://www.cainiaoxueyuan.com/yunwei/11706.html

phpStudy安装SSL证书实现https链接文章源自菜鸟学院-https://www.cainiaoxueyuan.com/yunwei/11706.html

==附件1:快速配置方法==================文章源自菜鸟学院-https://www.cainiaoxueyuan.com/yunwei/11706.html

1.扣盘 wifi破解 下载对应phpstudy2016前 或 2018的附件:[ ssl配置 phpstudy2016之前lite版 ] [ ssl配置 phpstudy2018版 ]文章源自菜鸟学院-https://www.cainiaoxueyuan.com/yunwei/11706.html

把 和 复制到对应文件夹下(按使用说明操作)文章源自菜鸟学院-https://www.cainiaoxueyuan.com/yunwei/11706.html

2.其它选项菜单——php扩展及设置——php_openssl[勾选上]文章源自菜鸟学院-https://www.cainiaoxueyuan.com/yunwei/11706.html

3.重启phpstudy文章源自菜鸟学院-https://www.cainiaoxueyuan.com/yunwei/11706.html

  • 本站内容整理自互联网,仅提供信息存储空间服务,以方便学习之用。如对文章、图片、字体等版权有疑问,请在下方留言,管理员看到后,将第一时间进行处理。
  • 转载请务必保留本文链接:https://www.cainiaoxueyuan.com/yunwei/11706.html

Comment

匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定