Fixes acme challenge path for certbot renewal

This commit is contained in:
Mouse Reeve 2021-01-02 12:14:51 -08:00
parent 042cfe2dfc
commit d3192fb1bb
2 changed files with 6 additions and 0 deletions

View file

@ -19,6 +19,7 @@ services:
certbot:
image: certbot/certbot:latest
command: certonly --webroot --webroot-path=/var/www/certbot --email ${EMAIL} --agree-tos --no-eff-email -d ${DOMAIN} -d www.${DOMAIN}
#command: renew --webroot --webroot-path /var/www/certbot
volumes:
- ./certbot/conf:/etc/letsencrypt
- ./certbot/logs:/var/log/letsencrypt

View file

@ -27,6 +27,11 @@ server {
ssl_certificate /etc/nginx/ssl/live/your-domain.com/fullchain.pem;
ssl_certificate_key /etc/nginx/ssl/live/your-domain.com/privkey.pem;
location ~ /.well-known/acme-challenge {
allow all;
root /var/www/certbot;
}
location / {
proxy_pass http://web;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;