From 197d76b64ff8ee9b724b711257a79981d0707eb1 Mon Sep 17 00:00:00 2001 From: thespad Date: Mon, 10 Nov 2025 21:52:44 +0000 Subject: [PATCH] Increase nginx buffer size to avoid too big header errors --- README.md | 1 + readme-vars.yml | 1 + .../nginx/site-confs/default.conf.sample | 48 +++++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 root/defaults/nginx/site-confs/default.conf.sample diff --git a/README.md b/README.md index 5dba9f7..7995b05 100644 --- a/README.md +++ b/README.md @@ -310,6 +310,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions +* **11.10.25:** - Update nginx configs for v1.7.2. Existing users should update their nginx confs to avoid errors. * **05.07.25:** - Rebase to Alpine 3.22. * **20.12.24:** - Rebase to Alpine 3.21. * **07.06.24:** - Cache Filament components and added APP_KEY as a required param. diff --git a/readme-vars.yml b/readme-vars.yml index 6332fd3..c76f51f 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -97,6 +97,7 @@ init_diagram: | "speedtest-tracker:latest" <- Base Images # changelog changelogs: + - {date: "11.10.25:", desc: "Update nginx configs for v1.7.2. Existing users should update their nginx confs to avoid errors."} - {date: "05.07.25:", desc: "Rebase to Alpine 3.22."} - {date: "20.12.24:", desc: "Rebase to Alpine 3.21."} - {date: "07.06.24:", desc: "Cache Filament components and added APP_KEY as a required param."} diff --git a/root/defaults/nginx/site-confs/default.conf.sample b/root/defaults/nginx/site-confs/default.conf.sample new file mode 100644 index 0000000..d060ea6 --- /dev/null +++ b/root/defaults/nginx/site-confs/default.conf.sample @@ -0,0 +1,48 @@ +## Version 2025/11/10 - Changelog: https://github.com/linuxserver/docker-speedtest-tracker/commits/main/root/defaults/nginx/site-confs/default.conf.sample + +server { + listen 80 default_server; + listen [::]:80 default_server; + listen 443 ssl default_server; + listen [::]:443 ssl default_server; + listen 443 quic reuseport default_server; + listen [::]:443 quic reuseport default_server; + + server_name _; + + include /config/nginx/ssl.conf; + + set $root /app/www/public; + if (!-d /app/www/public) { + set $root /config/www; + } + root $root; + index index.html index.htm index.php; + + location / { + # enable for basic auth + #auth_basic "Restricted"; + #auth_basic_user_file /config/nginx/.htpasswd; + + try_files $uri $uri/ /index.html /index.htm /index.php$is_args$args; + } + + location ~ ^(.+\.php)(.*)$ { + # enable the next two lines for http auth + #auth_basic "Restricted"; + #auth_basic_user_file /config/nginx/.htpasswd; + + fastcgi_split_path_info ^(.+\.php)(.*)$; + if (!-f $document_root$fastcgi_script_name) { return 404; } + fastcgi_pass 127.0.0.1:9000; + fastcgi_index index.php; + fastcgi_buffers 16 4k; + fastcgi_buffer_size 16k; + include /etc/nginx/fastcgi_params; + } + + # deny access to .htaccess/.htpasswd files + location ~ /\.ht { + deny all; + } +}