PHPStudy 安装SSL证书
PHPStudy 安装SSL证书
1.下载SSL证书并上传到服务器
选择 [Apache] , 点击[下载SSL证书]
yourdomain.com.crt (服务器证书)
yourdomain.com.key (私钥文件)如果为空请将生成CSR时保存的私钥内容粘贴在文件中
ca-bundle.crt (根证书链)
2. 先打开PHPStudy 的管理窗口, 点击 其他选项 , 打开配置文件 , vhosts-conf
4. 建议将配置放在httpd.conf文件里面, vhosts.conf 添加站点配置文件会重写,导致配置丢失。
<VirtualHost *:80>
DocumentRoot "D:phpStudyWWW"
ServerName demo.getssl.cn
ServerAlias
<Directory "D:phpStudyWWW">
Options FollowSymLinks ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
#建议将下面SSL配置 放在 httpd.conf文件中
Listen 443
<VirtualHost *:443>
DocumentRoot "D:phpStudyWWW"
ServerName demo.getssl.cn
ServerAlias
SSLEngine on
SSLProtocol all -SSLv2 -SSLv3
SSLCertificateFile d:/ssl/yourdomain.com.crt
SSLCertificateKeyFile d:/ssl/yourdomain.com.key
SSLCertificateChainFile d:/ssl/ca-bundle.crt
<Directory "D:phpStudyWWW">
Options FollowSymLinks ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>