服务提醒:若你再购买过程有任何问题,请与我们的24小时在线客服取得 联系 TG:@wwwsslsvip
phpStudy环境如何安装SSL证书?
2017-12-21 17:02    证书安装

第一步:修改apache目录下的httpd.conf配置文件

1、#LoadModule ssl_module modules/mod_ssl.so删除行首的配置语句注释符号“#”

2、Include extra/httpd-ssl.conf 将这行的注释的“#”去掉

第二步:

编辑extra/httpd-ssl.conf文件,修改如下内容:

ServerName 后面改成你的网站域名,可以不带端口号
DocumentRoot后面改成网站路径
SSLCertificateFile 后面改成server.crt文件路径
SSLCertificateKeyFile 后面改成server.key文件路径
SSLCertificateChainFile 后面改成ca.crt文件路径

ErrorLog 这行开头的可以注释掉(前面加#号)
TransferLog 这行开头的可以注释掉(前面加#号)
CustomLog 这行开头的可以注释掉(前面加#号)

3.phpstudy配置指定路径访问https(仅供参考,可以不用)。

RewriteEngine on 
RewriteCond %{REQUEST_URI} /homework 
RewriteRule^(.*)?$ https://%{SERVER_NAME}$1[L,R] 


4、保存退出,并重启Apache, 若有报错或者无法正常启动,请看错误日志。