Skip to content

Commit 13a66c8

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

2 files changed

Lines changed: 14 additions & 3 deletions

File tree

readme-vars.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ init_diagram: |
8585
"dokuwiki:latest" <- Base Images
8686
# changelog
8787
changelogs:
88+
- {date: "08.02.26:", desc: "Existing users should update: site-confs/default.conf - Deny access to all dotfiles."}
8889
- {date: "05.07.25:", desc: "Rebase to Alpine 3.22."}
8990
- {date: "10.05.25:", desc: "Rebase to Alpine 3.21."}
9091
- {date: "31.05.24:", desc: "Rebase to Alpine 3.20. Existing users should update their nginx confs to avoid http2 deprecation warnings."}

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

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
## Version 2024/07/16 - Changelog: https://github.com/linuxserver/docker-dokuwiki/commits/master/root/defaults/nginx/site-confs/default.conf.sample
1+
## Version 2026/02/08 - Changelog: https://github.com/linuxserver/docker-dokuwiki/commits/master/root/defaults/nginx/site-confs/default.conf.sample
22

33
server {
44
listen 80 default_server;
55
listen [::]:80 default_server;
66
listen 443 ssl default_server;
77
listen [::]:443 ssl default_server;
8+
listen 443 quic reuseport default_server;
9+
listen [::]:443 quic reuseport default_server;
810

911
server_name _;
1012

@@ -50,8 +52,16 @@ server {
5052
include /etc/nginx/fastcgi_params;
5153
}
5254

53-
# deny access to .htaccess/.htpasswd files
54-
location ~ /\.ht {
55+
# deny access to all dotfiles
56+
location ~ /\. {
5557
deny all;
58+
log_not_found off;
59+
access_log off;
60+
return 404;
61+
}
62+
63+
# Allow access to the ".well-known" directory
64+
location ^~ /.well-known {
65+
allow all;
5666
}
5767
}

0 commit comments

Comments
 (0)