nginx-configs/extensionless-php-fpm.conf
2025-02-21 14:41:52 +01:00

31 lines
539 B
Text

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;
}
}