四、在配置文件中搜索Include conf/vhosts.conf在这个语句下面添加Include conf/vhostssl.conf
文件中的内容如下(阿里云)
Listen 443
<VirtualHost *:443>
DocumentRoot "D:\WWW\WEBMULU(这里填写你的需要指向的根目录)"
ServerName www.example.com这里填写你的网址
ServerAlias example.com这里填写你的网址
SSLEngine on
SSLProtocol TLSv1 TLSv1.1 TLSv1.2
SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
SSLCertificateFile "D:\phpStudy\Apache\cert\public.pem"这里填写那个下载的文件里面的东西
SSLCertificateKeyFile "D:\phpStudy\Apache\cert\21564852664745.key"把这个名字也改为下载的名字
SSLCertificateChainFile "D:\phpStudy\Apache\cert\chain.pem"
<Directory "D:\WWW\WEBMULU(填写你需要指定的根目录)">
Options +Indexes +FollowSymLinks +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:443>
DocumentRoot "C:\phpstudy\WWW"
ServerName www.denglong.net.cn
ServerAlias denglong.net.cn
SSLEngine on
SSLProtocol TLSv1 TLSv1.1 TLSv1.2
SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
SSLCertificateFile "c:\phpStudy\Apache\cert\2_denglong.net.cn.crt"
SSLCertificateKeyFile "c:\phpStudy\Apache\cert\3_denglong.net.cn.key"
<Directory "C:\phpstudy\WWW">
Options +Indexes +FollowSymLinks +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
那么重点来了 如果你的apache启动不起来了 那么检查443端口是否被占用!!!!!!!!!!!!!!!!!!!