您的位置:首页 > 汽车 > 时评 > 官方网站查询叉车证_门户网站域名是什么_在线优化seo_长沙seo推广优化

官方网站查询叉车证_门户网站域名是什么_在线优化seo_长沙seo推广优化

2024/10/20 4:02:44 来源:https://blog.csdn.net/tealcwu/article/details/142834621  浏览:    关键词:官方网站查询叉车证_门户网站域名是什么_在线优化seo_长沙seo推广优化
官方网站查询叉车证_门户网站域名是什么_在线优化seo_长沙seo推广优化

本文测试使用Certbot在Amazon EC3上启用免费的https证书。

测试环境:Amzon EC2 (Ubuntu Server 24.0.2 LTS), 使用Nginx作为网页服务器

一、安装Nginx: sudo apt install nginx

二、添加nginx配置: sudo nano /etc/nginx/conf.d/test.com.conf

内容如下:

server {

listen 80;

server_name xxx.com;

root /usr/share/nginx/html;

index index.html;

charset UTF-8;

}

三、下载并安装certbot

1. 安装系统依赖项

sudo apt install python3

2. 设置Python虚拟环境

sudo python3 -m venv /opt/certbot/

sudo /opt/certbot/bin/pip install --upgrade pip

3. 安装Certbot

sudo /opt/certbot/bin/pip install certbot certbot-nginx

4. 准备certbot命令

sudo ln -s /opt/certbot/bin/certbot /usr/bin/certbot

5. 运行certbot命令

运行此命令以获取证书并让 Certbot 自动编辑 nginx 配置以提供服务,只需一步即可启用 HTTPS 访问,按提示配置就可以。

 sudo certbot --nginx

6. (可选)自动续订

echo "0 0,12 * * * root /opt/certbot/bin/python -c 'import random; import time; time.sleep(random.random() * 3600)' && sudo certbot renew -q" | sudo tee -a /etc/crontab > /dev/null

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com