1、需要开启ssl_module,找到apache的配置文件httpd.conf。
去掉LoadModule ssl_module modules/mod_ssl.so前面的#
添加一条Include conf/vhosts-ssl.conf即vhosts-ssl.conf为ssl证书的配置文件。
在vhosts-ssl.conf中写下如下内容,然后重启apache
Listen 443SSLEngine on SSLCertificateFile D:phpStudyWWWtp3sslwww.52blog.me.cer SSLCertificateChainFile D:phpStudyWWWtp3sslwww.52blog.me.crt SSLCertificateKeyFile D:phpStudyWWWtp3sslwww.52blog.me.key DocumentRoot "D:phpStudyWWWtp3" ServerName www.52blog.me ServerAlias Options FollowSymLinks ExecCGI AllowOverride All Order allow,deny Allow from all Require all granted