域名配置Https
2019-01-15 本文已影响0人
beatzcs
以Nginx服务器为例:
1.首先购买云服务器和域名,并完成绑定(域名要通过备案)。
2.申请免费证书(腾讯云有效期1年)

3.申请完证书下载到本地

4.选择自己需要的放置到服务器对应目录下

5.修改/etc/nginx/conf目录下的nginx.config配置文件

图中打码的即是需要个人修改的地方。
6.配置完成后,进入到/usr/local/sbin目录下,执行命令 ./nginx –t,测试 Nginx 配置是否有误

7.配置无误,重启nginx,在/usr/local/nginx/sbin目录下执行./nginx -s reload

若无报错,即可使用 https://www.域名.com 来访问你的网站。
最后附上 腾讯云SSL证书安装指引链接