certbot 服务器证书配置

cerbot

1

bash 复制代码
sudo apt update
sudo apt install python3 python3-venv libaugeas0

2

bash 复制代码
sudo python3 -m venv /opt/certbot/
sudo /opt/certbot/bin/pip install --upgrade pip

3

bash 复制代码
sudo /opt/certbot/bin/pip install certbot certbot-nginx

4

bash 复制代码
sudo ln -s /opt/certbot/bin/certbot /usr/bin/certbot

5

bash 复制代码
sudo certbot certonly --nginx

6 nginxx config

bash 复制代码
 server {
        listen 80;	
        server_name *****.eu;
        location / {
            # Redirect all HTTP traffic to HTTPS
            return 301 https://$host$request_uri;
        }
    }
    server {
        listen 443 ssl;
        server_name *****eu;
        access_log /var/log/nginx/access.log;
        error_log /var/log/nginx/error.log;
		include /etc/letsencrypt/options-ssl-nginx.conf;
        ssl_certificate /etc/letsencrypt/live/digitalshield.ydns.eu/fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/digitalshield.ydns.eu/privkey.pem;
        ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
        location / {
       	    proxy_pass http://*****;
        }
    }
相关推荐
ABB自动化32 分钟前
for AC500 PLCs 3ADR025003M9903的安全说明
服务器·安全·机器人
努力学习的小廉39 分钟前
深入了解linux系统—— 进程池
linux·运维·服务器
秃头菜狗1 小时前
各个主要目录的功能 / Linux 常见指令
linux·运维·服务器
利刃大大1 小时前
【在线五子棋对战】二、websocket && 服务器搭建
服务器·c++·websocket·网络协议·项目
vfvfb2 小时前
bat批量去掉本文件夹中的文件扩展名
服务器·windows·批处理·删除扩展名·bat技巧
jiunian_cn2 小时前
【Linux】centos软件安装
linux·运维·centos
藥瓿亭3 小时前
K8S认证|CKS题库+答案| 6. 创建 Secret
运维·ubuntu·docker·云原生·容器·kubernetes·cks
2302_809798323 小时前
【JavaWeb】Docker项目部署
java·运维·后端·青少年编程·docker·容器
嵌入式大圣3 小时前
Neko虚拟浏览器远程协作方案:Docker+内网穿透技术部署实践
运维·docker·容器
玩转4G物联网3 小时前
零基础玩转物联网-串口转以太网模块如何快速实现与TCP服务器通信
服务器·网络·物联网·网络协议·tcp/ip·http·fs100p