Valentin
I have some static sites which don't require PHP. From a security and performance view, it would be nice if there was a possibility to disable PHP for a site.
Dennis
You can, just put these lines in comment:
location ~ \.php$ {
try_files $uri /index.php =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/run/php/php8.1-fpm.sock;
fastcgi_buffers 16 16k;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
And change this:
index index.php index.html;
To:
index index.html;
Ability to disable PHP for a website
-
Dennis moved item to board Closed
1 year ago -
Valentin moved item to project Site Level Requests
1 year ago -
Valentin created the item
1 year ago