跳到主要内容
基础类问题

云服务器PhpStudy环境如何安装SSL证书

更新于 682 次浏览
文档分类

第一步:

修改 apache 目录下的 httpd.conf 配置文件。

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

2、增加一条引用语句 Include conf/vhost-ssl.conf。

第二步:

1、在conf文件夹中创建一个vhost-ssl.conf配置文件。

2、编辑vhost-ssl.conf文件,增加如下内容:

<VirtualHost *:443>Listen 443SSLEngine onSSLProtocol all -SSLv2 -SSLv3SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5SSLCertificateFile “D:\phpStudy\Apache\conf\ssl\www.niaoyundemo.com” //服务器证书SSLCertificateKeyFile “D:\phpStudy\Apache\conf\ssl\private.key” //证书私钥SSLCertificateChainFile “D:\phpStudy\Apache\conf\ssl\ca.crt” //根证书DocumentRoot “D:\phpStudy\WWW”<Directory "D:\phpStudy\WWW">Options +Indexes +FollowSymLinks +ExecCGIAllowOverride AllOrder allow,denyAllow from allRequire all granted</Directory></VirtualHost>

3.phpstudy配置指定路径访问https(仅供参考)。

RewriteEngine onRewriteCond %{REQUEST_URI} /homeworkRewriteRule^(.*)?$ https://%{SERVER_NAME}$1[L,R]

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


感谢:八艾云计算提供云服务器,香港空间,进行测试!

这篇文档解决你的问题了吗?

相关文档

还是没解决? 把遇到的情况提给我们,技术团队会跟进处理
工单