- 第一步:
ssl 证书阿里云ssl 证书控制台免费申请 (前提你得有域名)
修改apache目录下的httpd.conf配置文件,#LoadModule ssl_module modules/mod_ssl.so删除行首的配置语句注释符号“#”,
如果没有找到的话 看下面图片 (php 工具箱也是一样 找其他菜单)需要勾选这个 默认是没有勾选的
增加一条引用语句 Include conf/vhostsssl.conf。
2. 第二步:
在conf文件夹中创建一个vhostsssl.conf配置文件,编辑vhostsssl.conf文件,增加如下内容
Listen 443
<VirtualHost *:443>
DocumentRoot "C:\myphp_www\PHPTutorial\WWW"
ServerName hbxtwjx.cn
ServerAlias
DocumentRoot "C:\myphp_www\PHPTutorial\WWW"
SSLEngine on
SSLProtocol all -SSLv2 -SSLv3
SSLCipherSuite AESGCM:ALL:!DH:!EXPORT:!RC4:+HIGH:!MEDIUM:!LOW:!aNULL:!eNULL
SSLCertificateFile "C:\myphp_www\PHPTutorial\Apache\cert\证书.cn_public.crt"
SSLCertificateKeyFile "C:\myphp_www\PHPTutorial\Apache\cert\密钥.cn.key"
SSLCertificateChainFile "C:\myphp_www\PHPTutorial\Apache\cert\证书链配置.cn_chain.crt"
<Directory "C:\myphp_www\PHPTutorial\WWW">
Options FollowSymLinks ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
因为有两个.crt a_chai结尾的是证书链配置
然后https:域名访问就行