Skip to content

Commit 75373e1

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

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
@@ -95,6 +95,7 @@ init_diagram: |
9595
"phpmyadmin:latest" <- Base Images
9696
# changelog
9797
changelogs:
98+
- {date: "08.02.26:", desc: "Existing users should update: site-confs/default.conf - Deny access to all dotfiles."}
9899
- {date: "28.12.25:", desc: "Rebase to Alpine 3.23."}
99100
- {date: "23.08.25:", desc: "Add support for mTLS. Existing users will need to delete their config.inc.php and restart the container."}
100101
- {date: "05.07.25:", desc: "Rebase to Alpine 3.22."}

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

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

33
map $sent_http_content_type $expires {
44
default off;
@@ -12,6 +12,8 @@ server {
1212
listen [::]:80 default_server;
1313
listen 443 ssl default_server;
1414
listen [::]:443 ssl default_server;
15+
listen 443 quic reuseport default_server;
16+
listen [::]:443 quic reuseport default_server;
1517

1618
server_name _;
1719

@@ -44,8 +46,16 @@ server {
4446
fastcgi_read_timeout 3600;
4547
}
4648

47-
# deny access to .htaccess/.htpasswd files
48-
location ~ /\.ht {
49+
# deny access to all dotfiles
50+
location ~ /\. {
4951
deny all;
52+
log_not_found off;
53+
access_log off;
54+
return 404;
55+
}
56+
57+
# Allow access to the ".well-known" directory
58+
location ^~ /.well-known {
59+
allow all;
5060
}
5161
}

0 commit comments

Comments
 (0)