在Apache的目录下找到conf/extra/httpd-ssl.conf文件
首先添加(添加后就可以配置多个https站点了,看是否已添加过,如果有无需再添)
NameVirtualHost *:443
SSLStrictSNIVHostCheck off
然后注意
<VirtualHost _default_:443>(这个是默认的)
要找到</VirtualHost> 这个对应结束标签然后在他后面添加一个新的VirtualHost
<VirtualHost *:443>
DocumentRoot "D:/WEB/www.example.cn" #https站点路径
ServerName www.example.cn
ServerAlias m.example.cn
SSLEngine on
SSLProtocol all -SSLv2 -SSLv3
SSLCipherSuite HIGH:!RC4:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH:!EXP:+MEDIUM
SSLCertificateFile "public.crt证书路径"
SSLCertificateKeyFile ".key证书路径"
SSLCertificateChainFile "chain.crt证书路径"
<FilesMatch ".(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory "D:/WEB/www.example.cn">
SSLOptions +StdEnvVars
</Directory>
</VirtualHost>
多个站点就添加多个<VirtualHost *:443>(证书我都放到cert文件夹里面了)