From 9b1b174e52d0057a82c17fae32c635b3ade0aa9a Mon Sep 17 00:00:00 2001 From: Fabian Franz Date: Sun, 9 Jun 2024 12:26:56 +0200 Subject: [PATCH] add nginx config file --- scripts/nginx_xlx.conf | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 scripts/nginx_xlx.conf diff --git a/scripts/nginx_xlx.conf b/scripts/nginx_xlx.conf new file mode 100644 index 0000000..c26e54d --- /dev/null +++ b/scripts/nginx_xlx.conf @@ -0,0 +1,25 @@ +server { + listen *:80 default; + listen [::]:80 ipv6only=on default; + server_name xlx999 xlx999.xxxxxx.ampr.org _; + root /srv/http/xlxd/dashboard; + location ~ ^/$ { + fastcgi_param SCRIPT_FILENAME $document_root/index.php; + fastcgi_param HTTP_PROXY ""; + fastcgi_pass unix:/run/php/php8.2-fpm.sock; + include /etc/nginx/fastcgi_params; + } + + location ~ [^/]\.php(/|$) { + fastcgi_split_path_info ^(.+?\.php)(/.*)$; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + fastcgi_param HTTP_PROXY ""; + + fastcgi_index index.php; + fastcgi_pass unix:/run/php/php8.2-fpm.sock; + include /etc/nginx/fastcgi_params; + } +}