How to fix SCRIPT_NAME with PHP-FPM and Apache's mod_fastcgi?
- by Kyle MacFarlane
I have the following in my Apache conf to get PHP-FPM working:
FastCgiExternalServer /srv/www/fast-cgi-fake-handler -host 127.0.0.1:9000
AddHandler php-fastcgi .php
AddType text/html .php
Action php-fastcgi /var/www/cgi-bin
Alias /var/www/cgi-bin /srv/www/fast-cgi-fake-handler
DirectoryIndex index.php
This works fine except that SCRIPT_NAME is always /var/www/cgi-bin and some scripts use SCRIPT_NAME to work out the location of the current script (vBulletin).
Google has plenty of solutions for Nginx but not a word for Apache.