839 B
839 B
To issue a certificate:
-
Set certificates in your server .conf to this:
ssl_certificate /etc/nginx/snakeoil.pem; ssl_certificate_key /etc/nginx/snakeoil.key;
-
Issue the certificate:
export DOMAIN=<domain> docker compose exec acme mkdir /etc/ssl/$DOMAIN docker compose exec acme --issue --server letsencrypt -d $DOMAIN --webroot /var/www/html/$DOMAIN docker compose exec acme --install-cert -d $DOMAIN --key-file /etc/ssl/$DOMAIN/key.pem --fullchain-file /etc/ssl/$DOMAIN/fullchain.pem
-
Set certificates in your server .conf to this:
ssl_certificate /etc/ssl/<domain>/fullchain.pem; ssl_certificate_key /etc/ssl/<domain>/key.pem;
-
Restart nginx:
docker compose exec nginx nginx -s reload
You have to do this (or restart) every up to 3 months.