From a1d0efedca5baca7db824df12cd6e8fe6be9bde4 Mon Sep 17 00:00:00 2001 From: Eric Nemchik Date: Sun, 8 Feb 2026 09:39:35 -0600 Subject: [PATCH] Update default.conf.sample to deny dotfile access Signed-off-by: Eric Nemchik --- readme-vars.yml | 1 + root/defaults/nginx/site-confs/default.conf.sample | 14 +++++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/readme-vars.yml b/readme-vars.yml index f63f6ec..f2910f5 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -90,6 +90,7 @@ init_diagram: | "xbackbone:latest" <- Base Images # changelog changelogs: + - {date: "08.02.26:", desc: "Existing users should update: site-confs/default.conf - Deny access to all dotfiles."} - {date: "27.05.24:", desc: "Rebase to Alpine 3.20. Existing users should update their nginx confs to avoid http2 deprecation warnings."} - {date: "28.12.23:", desc: "Rebase to Alpine 3.19 with php 8.3."} - {date: "25.12.23:", desc: "Existing users should update: site-confs/default.conf - Cleanup default site conf."} diff --git a/root/defaults/nginx/site-confs/default.conf.sample b/root/defaults/nginx/site-confs/default.conf.sample index fc244d6..95d1d0f 100644 --- a/root/defaults/nginx/site-confs/default.conf.sample +++ b/root/defaults/nginx/site-confs/default.conf.sample @@ -1,4 +1,4 @@ -## Version 2025/07/09 - Changelog: https://github.com/linuxserver/docker-xbackbone/commits/main/root/defaults/nginx/site-confs/default.conf.sample +## Version 2026/02/08 - Changelog: https://github.com/linuxserver/docker-xbackbone/commits/main/root/defaults/nginx/site-confs/default.conf.sample server { listen 80 default_server; @@ -39,9 +39,17 @@ server { include /etc/nginx/fastcgi_params; } - # deny access to .htaccess/.htpasswd files - location ~ /\.ht { + # deny access to all dotfiles + location ~ /\. { deny all; + log_not_found off; + access_log off; + return 404; + } + + # Allow access to the ".well-known" directory + location ^~ /.well-known { + allow all; } autoindex off;