1、到云服务器提供商或者其它平台购买或者寻找免费的SSL证书并进行下载。
2、将下载后的SSL证书文件放置到apache目录下
3、在apache配置文件httpd.conf中添加一行:
Include conf/vhostssl.conf
4、在conf目录下新建vhostssl.conf配置文件
在vhostssl.conf中添加如下配置文件:
Listen 443
<VirtualHost *:443>
ServerName www.sindsun.com:443
DocumentRoot "D:/WWW/sindsun_com_system/main/pc"
ServerAlias www.sindsun.com
SSLEngine on
SSLCertificateFile "D:/ctr/wwwsindsuncom/www.sindsun.com.crt"
SSLCertificateKeyFile "D:/Apache/ctr/wwwsindsuncom/www.sindsun.com.key"
SSLCertificateChainFile "D:/Apache/ctr/wwwsindsuncom/www.sindsun.com-ca-bundle.crt"
</VirtualHost>
5、配置站点根目录下的.htacess文件,点击这里查看
6、重启apache,https配置生效
说明:https用的443端口,如果有其它程序占用,则不能正常使用https
版权声明: 此文为本站源创文章[或由本站编辑从网络整理改编], 转载请备注出处:http://www.sindsun.com/article-details-58.html [若此文确切存在侵权,请联系本站管理员进行删除!]
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有