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://*****;
}
}