概述
转载 https://blog.csdn.net/m0_38025747/article/details/80602651
1、nginx 安装配置 就不在这说了
2、申请SSL证书并进行配置
点击Get Started
或直接访问Certbot官网
其中Software为服务器类型,System为服务器上系统类型。
我使用的是Ubuntu 16.04(xenial)和Nginx。
安装Cerbot
sudo apt-get update
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install python-certbot-nginx
使用Cerbot中的Nginx插件(自动版,可能会不行)
sudo certbot –nginx
此命令将自动获取证书并且Certbot会编辑Nginx配置并完成所有工作,
只需在命令运行期间根据命令的提示输入你要配置SSL的域名即可。
如果想自定义Nginx配置,则使用certonly子命令即可。
sudo certbot –nginx certonly
自动更新证书期限
Certbot提供的证书期限为90天,执行此命令可自动续订证书。
sudo certbot renew –dry-run
最后
以上就是还单身小猫咪为你收集整理的ubuntu nginx 配置 https 证书的全部内容,希望文章能够帮你解决ubuntu nginx 配置 https 证书所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复