Fixing ruTorrent errors with nginx 1.6.1-2

The nginx 1.6.1-2 release on Debian Backports made a change to the default fastcgi configuration file with an almost casual reference in the release notes:

Talk about an understatement – that change broke every single PHP based site I manage (including this blog).

Fixing the errors from this change depends on how ruTorrent is setup – If ruTorrent is running as the only application on the site then the change is fairly straight forward, change the location handler for PHP files to include the SCRIPT_FILENAME parameter:

On the other hand, if ruTorrent is setup to run from a subfolder off the main site, i.e. http://site.com/rutorrent the parameter is quite different and figuring out what is the correct syntax proved to be surprisingly difficult. I could never get the ruTorrent debug log to work and the on-screen error messages are singularly unhelpful. The magic incantation for ruTorrent as a subfolder is to use REQUEST_FILENAME in the fastcgi_param config instead: