前言:之前实习要求把公司的官网升级为https,一直也在网上找博客找方法,但是都没什么用。于是后来自己也总结了最简单的方法,下面给大家带来详细的步骤:
整体步骤:
- 安装python2.7.5
- 安装certbot
- 生成证书
- 配置并重新加载nginx服务器
具体步骤:
- 在shell中输入certbot certonly 可以根据指引获取CA证书。(未验证完 )
certbot certonly - 若提示binding to port 80:Could not bind to IPv4 or IPv6,因为nginx占用80端口
输入 nginx -s stop停止 ,注意不是service nginx stop。
nginx -s stop -
若无上述错误,在步骤1之后,certbot会出现一系列指令引导升级,看着提示操作即可。
输入service nginx start 开启。
本文详细介绍了将公司官网从HTTP升级到HTTPS的过程,包括Python环境搭建、certbot证书申请、nginx配置及重启等关键步骤。

528

被折叠的 条评论
为什么被折叠?



