服务器HTTPS设置

1、PHPSTUDY 确定开启PHP_OPENSSL
data-attr-org-src-id=0024BA9E02B5451D9A69FDBA460BB012
2、
在 apache/conf/httpd.conf 中下列两行:去掉前面的“#”
LoadModule ssl_module modules/mod_ssl.so
Include conf/extra/httpd-ssl.conf
3、(绑定域名访问在apache/conf文件夹下创建一个名为vhosts_ssl.conf的配置文件,增加内容如下
Listen 443
SSLStrictSNIVHostCheck off
SSLCipherSuite AESGCM:ALL:!DH:!EXPORT:!RC4:+HIGH:!MEDIUM:!LOW:!aNULL:!eNULL
SSLProtocol all -SSLv2 -SSLv3
<VirtualHost *:443>
   DocumentRoot "C:\web\xiaochengxu"
   ServerName www.guoranstu.cn
   ServerAlias xiaochengxu.guoranstu.cn
   Errorlog "C:\phpStudy\Apache\logs\error.log"
 <Directory "C:\web\xiaochengxu">
     Options FollowSymLinks ExecCGI
     AllowOverride All
     Order allow,deny
     Allow from all
     Require all granted
 </Directory>
SSLEngine on
SSLCertificateFile  "C:\phpStudy\Apache\conf\ssl\stucnserver.crt"//此处的3个证书文件就用在免费证书网站申请的那些。
SSLCertificateKeyFile "C:\phpStudy\Apache\conf\ssl\stucnserver.key"
SSLCertificateChainFile "C:\phpStudy\Apache\conf\ssl\stucnca.crt"
</VirtualHost>
3、在apache/conf/httpd.conf 中的Include conf/vhosts.conf下方增加:Include conf/vhosts_ssl.conf
重启APACHE


联系我们

如有问题请联系我们,我们7*24小时竭诚为您服务