Well, in that case you may as well support SCRIPT_URL / SCRIPT_URI, as there are some [old] PHP scripts that rely on these variables set normally by Apache.
nginx.conf:
http {
...
map $uri $script_url {
~^(?<script_filename>.+\.(php|html))(?<path_info>.+)$ $path_info;
~^(?<script_filename>.+\.(php|html))$ $script_filename;
}
...
}
fastcgi_php.conf:
include fastcgi_params;
fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param SCRIPT_URL $script_url;
fastcgi_param SCRIPT_URI $scheme://$http_host$script_url;
try_files $fastcgi_script_name = 404;