《PHPStudy环境如何安装SSL证书?》要点:
本文介绍了PHPStudy环境如何安装SSL证书?,希望对您有用。如果有疑问,可以联系我们。
什么是PHPStudy
该程序包集成最新的Apache+PHP+MysqL+PHPMyAdmin+ZendOptimizer,一次性安装,无须配置即可使用,是非常方便、好用的PHP调试环境·该程序不仅包括PHP调试环境,还包括了开发工具、开发手册等·总之学习PHP只需一个包.
PHPStudy环境如何安装SSL证书
此配置方法针对非 纯Apache web环境配置SSL证书.文档用比较常用的集成环境PHPStudy集成工具做例子,首先请要准备好下列工具.
工具
申请并下载好ssl证书(PEM格式)
PHPstudy集成环境下正常运行的网站
避免意外请先备份(复制)好httpd.conf配置文件.
具体步骤
第一步:
1、#LoadModule ssl_module modules/mod_ssl.so删除行首的配置语句注释符号“#”
2、增加一条引用语句 Include conf/vhostsssl.conf
第二步:
1、在conf文件夹中创建一个vhostsssl.conf配置文件.
Listen 443
<VirtualHost *:443>
SSLEngine on
SSLProtocol all -SSLv2 -SSLv3
SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
SSLCertificateFile “D:/JspStudy/Apache/conf/ssl/2_www.****.com.crt”
SSLCertificateKeyFile “D:/JspStudy/Apache/conf/ssl/3_www.***.com.key”
SSLCertificateChainFile “D:/JspStudy/Apache/conf/ssl/1_root_bundle.crt”
DocumentRoot “D:\JspStudy\WWW”
<Directory />
Options +Indexes +FollowSymLinks +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
其中
SSLCertificateFile 是指证书公钥
SSLCertificateKeyFile 是指证书私钥
SSLCertificateChainFile 是指根证书
3.PHPstudy配置指定路径访问https(仅供参考).
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_URI} /homework
RewriteRule^(.*)?$ https://%{SERVER_NAME}$1[L,R]
</IfModule>
4、保存退出,并重启Apache.
文章转载:https://www.trustauth.cn/wiki/22036.html