From db787cc57cc26473da08e3a5df08ada7305bc55a Mon Sep 17 00:00:00 2001 From: vlw Date: Fri, 21 Feb 2025 14:41:52 +0100 Subject: [PATCH] Upload files to "/" --- extensionless-php-fpm.conf | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 extensionless-php-fpm.conf diff --git a/extensionless-php-fpm.conf b/extensionless-php-fpm.conf new file mode 100644 index 0000000..9a09eb9 --- /dev/null +++ b/extensionless-php-fpm.conf @@ -0,0 +1,31 @@ +server { + listen 80; + + server_name _; + + root /var/www; + index index.html index.php; + + client_max_body_size 100M; + + add_header Access-Control-Allow-Origin *; + + location / { + try_files $uri $uri.html $uri/ @extensionless-php; + autoindex on; + } + + location ~ \.php$ { + include snippets/fastcgi-php.conf; + fastcgi_pass unix:/run/php/php8.3-fpm.sock; + } + + location @extensionless-php { + rewrite ^(.*)$ $1.php last; + } + + location /tools/pla/index.php { + include snippets/fastcgi-php.conf; + fastcgi_pass unix:/run/php/php7.3-fpm.sock; + } +}