location /blog {
alias /home/ploi/blog.server.com/public;
try_files $uri $uri/ @blogrewrite;
location ~ .php$ {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
}
}
location @blogrewrite {
rewrite /blog/(.*)$ /blog/index.php?/$1 last;
}