certbot
Ensure that your version of snapd is up to date
sudo snap install core; sudo snap refresh core
1
2
3
2
3
Remove certbot-auto and any Certbot OS packages
sudo apt-get remove certbot
1
Install Certbot
sudo snap install --classic certbot
1
Prepare the Certbot command
sudo ln -s /snap/bin/certbot /usr/bin/certbot
1
Either get and install your certificates
手动在nginx中加入
server {
server_name jenkins.birenchong.cn;
location / {
proxy_set_header X_Real_IP $remote_addr;
proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:10240;
proxy_redirect off;
}
}
执行
sudo certbot --nginx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Test automatic renewal
sudo certbot renew --dry-run
The command to renew certbot is installed in one of the following locations:
/etc/crontab/
/etc/cron.*/*
systemctl list-timers
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
Last Updated: 2023/11/08, 14:45:54