certbot —— 安装证书

为什么网站要安装证书?

安装证书后 http -> https
http :明文传输,容易被中间人篡改信息。
http :加密传输,中间人无法获取实际数据,由于证书的存在,更不能转发。

参考链接:https://blog.csdn.net/dong123ohyes/article/details/112281958

什么是 certbot

Certbot 是 EFF 加密整个 Internet 的工作的一部分。网络上的安全通信依赖于 HTTPS,HTTPS 需要使用数字证书,该数字证书可使浏览器验证 Web 服务器的身份(例如,这真的是 google.com 吗?)。Web 服务器从称为证书颁发机构(CA)的受信任第三方获取证书。Certbot 是一个易于使用的客户端,可以从 Let’s Encrypt(由 EFF,Mozilla 和其他公司发起的开放式证书颁发机构)中获取证书,并将其部署到 Web 服务器。

任何在设置安全网站方面遇到麻烦的人都知道获取和维护证书的麻烦。Certbot 和 Let’s Encrypt 可以自动消除麻烦,并让您使用简单的命令打开和管理 HTTPS。使用 Certbot 和 Let’s Encrypt 是免费的,因此无需安排付款。

利用 certbot 为服务器搞证书:
参考链接:https://blog.csdn.net/shallow72/article/details/119634415
certbot官网:https://certbot.eff.org/instructions?ws=nginx&os=ubuntufocal

安装 certbot 中遇到的问题:

申请https证书时遇到错误:

The nginx plugin is not working; there may be problems with your existing configuration.
The error was: NoInstallationError("Could not find a usable 'nginx' binary. Ensure nginx exists, the binary is executable, and your PATH is set correctly.")

解决方案:

就是找不到 nginx 的可执行二进制,所以,nginx 一定不要用容器了,,,直接装吧。

参考链接:https://blog.csdn.net/qq_27346503/article/details/115680526

ubuntu安装nginx

ubuntu安装nginx

一、apt-get安装nginx

# 安装
sudo apt-get install nginx
# 查看nginx是否安装成功
nginx -v
# 启动nginx
sudo service nginx start
启动后,在网页重输入ip地址,即可看到nginx的欢迎页面。至此nginx安装成功

# nginx文件安装完成之后的文件位置:

/usr/sbin/nginx:主程序
/etc/nginx:存放配置文件
/usr/share/nginx:存放静态文件
/var/log/nginx:存放日志
# 卸载apt-get安装的nginx

# 彻底卸载nginx
sudo apt-get --purge autoremove nginx
#查看nginx的版本号
nginx -v


参考链接:https://www.cnblogs.com/fireblackman/p/15692833.html
posted @ 2022-04-29 17:32  pythoner_wl  阅读(419)  评论(0编辑  收藏  举报