From fbe212b67c8dd255e326daa30fd4517fed0523e4 Mon Sep 17 00:00:00 2001 From: Eric Nemchik Date: Mon, 27 Nov 2023 18:27:05 -0600 Subject: [PATCH 1/2] Fix index.php being downloaded on 404 Signed-off-by: Eric Nemchik --- readme-vars.yml | 1 + root/defaults/nginx/site-confs/default.conf.sample | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/readme-vars.yml b/readme-vars.yml index 3cd4ccc..64c2871 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -153,6 +153,7 @@ app_setup_block: | # changelog changelogs: + - { date: "27.04.23:", desc: "[Existing users should update:](https://github.com/linuxserver/docker-swag/blob/master/README.md#updating-configs) site-confs/default.conf - Fix index.php being downloaded on 404." } - { date: "01.10.23:", desc: "Fix \"unrecognized arguments\" issue in DirectAdmin DNS plugin." } - { date: "28.08.23:", desc: "Add Namecheap DNS plugin." } - { date: "12.08.23:", desc: "Add FreeDNS plugin. Detect certbot DNS authenticators using CLI." } diff --git a/root/defaults/nginx/site-confs/default.conf.sample b/root/defaults/nginx/site-confs/default.conf.sample index df852ed..9c858e0 100644 --- a/root/defaults/nginx/site-confs/default.conf.sample +++ b/root/defaults/nginx/site-confs/default.conf.sample @@ -1,4 +1,4 @@ -## Version 2023/06/05 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx/site-confs/default.conf.sample +## Version 2023/11/27 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx/site-confs/default.conf.sample # redirect all traffic to https server { @@ -48,7 +48,7 @@ server { # enable for Authentik (requires authentik-server.conf in the server block) #include /config/nginx/authentik-location.conf; - try_files $uri $uri/ /index.html /index.php$is_args$args =404; + try_files $uri $uri/ /index.html /index.php$is_args$args; } location ~ ^(.+\.php)(.*)$ { @@ -65,6 +65,7 @@ server { # enable for Authentik (requires authentik-server.conf in the server block) #include /config/nginx/authentik-location.conf; + try_files $fastcgi_script_name =404; fastcgi_split_path_info ^(.+\.php)(.*)$; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; From b9dd1b7c5a71c4a5f59208261b158908f0bc2f94 Mon Sep 17 00:00:00 2001 From: Eric Nemchik Date: Thu, 30 Nov 2023 17:33:07 -0600 Subject: [PATCH 2/2] Update readme-vars.yml --- readme-vars.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme-vars.yml b/readme-vars.yml index 682b349..277c47b 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -153,7 +153,7 @@ app_setup_block: | # changelog changelogs: - - { date: "27.04.23:", desc: "[Existing users should update:](https://github.com/linuxserver/docker-swag/blob/master/README.md#updating-configs) site-confs/default.conf - Fix index.php being downloaded on 404." } + - { date: "30.11.23:", desc: "[Existing users should update:](https://github.com/linuxserver/docker-swag/blob/master/README.md#updating-configs) site-confs/default.conf - Fix index.php being downloaded on 404." } - { date: "23.11.23:", desc: "Run certbot as root to allow fix http validation." } - { date: "01.10.23:", desc: "Fix \"unrecognized arguments\" issue in DirectAdmin DNS plugin." } - { date: "28.08.23:", desc: "Add Namecheap DNS plugin." }