打开Apache的httpd.conf文件,
#LoadModule ssl_module modules/mod_ssl.so ,去掉该行前面的"#"符号
2.在Apache的配置目录conf下,新建配置文件,列如:hostsssl.conf文件,添加如下代码
Listen 443
<VirtualHost *:443>
SSLEngine on
SSLProtocol all -SSLv2 -SSLv3
SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
SSLCertificateFile "C:/phpStudy/Apache/conf/ssl/server.crt"
SSLCertificateKeyFile "C:/phpStudy/Apache/conf/ssl/server.key"
SSLCertificateChainFile "C:/phpStudy/Apache/conf/ssl/ca-bundle.crt"
DocumentRoot "C:/wamp/www/dongba"
<Directory />
Options +Indexes +FollowSymLinks +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
//其中这三个是ssl证书,需对应到实际的路径
SSLCertificateFile "C:/phpStudy/Apache/conf/ssl/server.crt"
SSLCertificateKeyFile "C:/phpStudy/Apache/conf/ssl/server.key"
SSLCertificateChainFile "C:/phpStudy/Apache/conf/ssl/ca-bundle.crt"
3.将hostsssl.conf文件包含到httd.conf配置文件中,在httpd.conf文件中添加如下一行
Include conf/vhostsssl.conf
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。