From fb1014c8fd2491b2198de91ff3393aca1a935906 Mon Sep 17 00:00:00 2001 From: Eric Nemchik Date: Mon, 14 Nov 2022 21:16:04 +0000 Subject: [PATCH] Include default.conf Don't include =404 in try_files --- .../nginx/site-confs/default.conf.sample | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 root/defaults/nginx/site-confs/default.conf.sample 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..edc67f3 --- /dev/null +++ b/root/defaults/nginx/site-confs/default.conf.sample @@ -0,0 +1,34 @@ +## Version 2022/10/04 - Changelog: https://github.com/linuxserver/docker-heimdall/commits/master/root/defaults/nginx/site-confs/default.conf.sample + +server { + listen 80 default_server; + listen [::]:80 default_server; + + listen 443 ssl http2 default_server; + listen [::]:443 ssl http2 default_server; + + server_name _; + + root /app/www/public; + 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.php$is_args$args; + } + + location ~ ^(.+\.php)(.*)$ { + fastcgi_split_path_info ^(.+\.php)(.*)$; + fastcgi_pass 127.0.0.1:9000; + fastcgi_index index.php; + include /etc/nginx/fastcgi_params; + } + + # deny access to .htaccess/.htpasswd files + location ~ /\.ht { + deny all; + } +}