Skip to content

Commit b54d672

Browse files
committed
Update default.conf.sample to deny dotfile access
Signed-off-by: Eric Nemchik <[email protected]>
1 parent 0c9fc7e commit b54d672

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

root/defaults/nginx/site-confs/default.conf.sample

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Version 2025/12/26 - Changelog: https://github.com/linuxserver/docker-baseimage-alpine-nginx/commits/3.23/root/defaults/nginx/site-confs/default.conf.sample
1+
## Version 2026/02/08 - Changelog: https://github.com/linuxserver/docker-baseimage-alpine-nginx/commits/3.23/root/defaults/nginx/site-confs/default.conf.sample
22

33
server {
44
listen 80 default_server;
@@ -39,8 +39,16 @@ server {
3939
include /etc/nginx/fastcgi_params;
4040
}
4141

42-
# deny access to .htaccess/.htpasswd files
43-
location ~ /\.ht {
42+
# deny access to all dotfiles
43+
location ~ /\. {
4444
deny all;
45+
log_not_found off;
46+
access_log off;
47+
return 404;
48+
}
49+
50+
# Allow access to the ".well-known" directory
51+
location ^~ /.well-known {
52+
allow all;
4553
}
4654
}

0 commit comments

Comments
 (0)