注意 服务器要打开443端口
1.申请证书,这里推荐腾讯云或者阿里云的,有免费的证书,要求不高的盆友可以试一试
2.打开php.ini扩展。
extension=php_openssl.dll
3.打开httpd.conf扩展
Include conf/extra/httpd-ssl.conf
4.把下好的证书复制到
Apacheconfssl
5.编辑http-ssl.conf文件(位置:Apacheconfextra)
删除里http-ssl.conf的内容
键入代码
SSLStrictSNIVHostCheck off SSLCipherSuite AESGCM:ALL:!DH:!EXPORT:!RC4:+HIGH:!MEDIUM:!LOW:!aNULL:!eNULL SSLProtocol all -SSLv2 -SSLv3 <VirtualHost *:443> DocumentRoot "D:WWWhttpsPro" #项目地址 ServerName ssl.test.com #域名 ServerAlias test.com #域名 <Directory "D:WWWhttpsPro"> #项目地址 Options FollowSymLinks ExecCGI AllowOverride All Order allow,deny Allow from all Require all granted </Directory> SSLEngine on SSLCertificateFile "D:phpstudyApacheconfsslscenewood2_test.com.crt" #证书 2_域名_crt SSLCertificateKeyFile "D:phpstudyApacheconfsslscenewood3_test.com.key" #证书 3_域名_key SSLCertificateChainFile "D:phpstudyApacheconfsslscenewood1_root_bundle.crt" #证书 1_root_bundle.crt </VirtualHost>
最后一步,重启Apache,搞定,看看你的绿标,开心不,快乐不!