Edit the Nginx configuration file for the site (not the server), replace the location ~ \.php$
block with following
location ~ \.php$ {
try_files $uri /index.php?$args;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
Comments