From 61d466f7a2da4b19211d1f4bd09ef1e7ae30c165 Mon Sep 17 00:00:00 2001 From: maxlath Date: Sat, 31 May 2025 16:49:41 +0200 Subject: [PATCH] nginx: fix inconsistencies in certbox public file directory Some where referring to /var/www/html, some to /var/www/certbot: now everything should be in /var/www/html, that should fix certificate renewal --- docker-compose.yml | 6 +++--- nginx/templates/default.conf.template | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 766de7e..21d11cb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -69,7 +69,7 @@ services: - ./nginx/templates:/etc/nginx/templates/ - ./nginx/snippets:/etc/nginx/snippets - inventaire-server:/opt/inventaire - - certbot-www:/var/www/certbot + - certbot-www:/var/www/html - ./certbot/conf:/etc/letsencrypt - nginx-cache:/tmp/nginx env_file: .env @@ -81,9 +81,9 @@ services: image: certbot/certbot:latest volumes: - ./certbot/conf:/etc/letsencrypt - - certbot-www:/var/www/certbot + - certbot-www:/var/www/html restart: unless-stopped - entrypoint: /bin/sh -c "trap exit TERM; while :; do certbot renew --webroot -w /var/www/certbot; sleep 12h & wait $${!}; done;" + entrypoint: /bin/sh -c "trap exit TERM; while :; do certbot renew --webroot -w /var/www/html; sleep 12h & wait $${!}; done;" depends_on: - nginx diff --git a/nginx/templates/default.conf.template b/nginx/templates/default.conf.template index ffbcd04..dcb4f78 100755 --- a/nginx/templates/default.conf.template +++ b/nginx/templates/default.conf.template @@ -187,7 +187,7 @@ server { location ^~ '/.well-known/acme-challenge' { include /etc/nginx/snippets/security_headers.conf; default_type "text/plain"; - root /var/www/certbot; + root /var/www/html; } location / {