From e1ec4a9041fefe562cdeb3dec8268ee4b8b8a186 Mon Sep 17 00:00:00 2001 From: Eric Nemchik Date: Wed, 6 Mar 2024 12:43:05 -0600 Subject: [PATCH] Cleanup default site conf (#66) * Cleanup default site conf Signed-off-by: Eric Nemchik * update date --------- Signed-off-by: Eric Nemchik Co-authored-by: aptalca <541623+aptalca@users.noreply.github.com> --- readme-vars.yml | 1 + root/defaults/nginx/site-confs/default.conf.sample | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/readme-vars.yml b/readme-vars.yml index c562066..5fcd76d 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -53,6 +53,7 @@ app_setup_block: | # changelog changelogs: + - {date: "06.03.24:", desc: "Existing users should update: site-confs/default.conf - Cleanup default site conf."} - {date: "17.02.24:", desc: "Add php81-exif."} - {date: "03.07.23:", desc: "Deprecate armhf. As announced [here](https://www.linuxserver.io/blog/a-farewell-to-arm-hf)"} - {date: "13.04.23:", desc: "Move ssl.conf include to default.conf."} diff --git a/root/defaults/nginx/site-confs/default.conf.sample b/root/defaults/nginx/site-confs/default.conf.sample index bbed02c..38f927f 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/04/13 - Changelog: https://github.com/linuxserver/docker-snapdrop/commits/master/root/defaults/nginx/site-confs/default.conf.sample +## Version 2024/03/06 - Changelog: https://github.com/linuxserver/docker-snapdrop/commits/master/root/defaults/nginx/site-confs/default.conf.sample server { listen 80 default_server; @@ -19,11 +19,16 @@ server { #auth_basic "Restricted"; #auth_basic_user_file /config/nginx/.htpasswd; - try_files $uri $uri/ /index.html /index.php$is_args$args; + 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; include /etc/nginx/fastcgi_params;