use different fastcgi backend in different folder

Samuel Vogel samydelux at gmail.com
Mon Sep 1 02:57:05 MSD 2008


I am wondering how I can tell nginx to use a different fastcgi backend 
for my phpmyadmin subfolder /pma.
This is what I did:

        location ~ /pma/.+\.php$ {
                fastcgi_pass   127.0.0.1:9001;
        }

        location ~ \.php$ {
                fastcgi_pass   127.0.0.1:9000;
        }

The php backend on port 9001 is chrooted to the /pma folder. The problem 
is, that $fastcgi_script_name now contains the /pma, so the php backend 
can't find the right file.
How can I strip of the /pma from $fastcgi_script_name.

I don't want to make another virtual host, since I don't want a seperate 
port or subdomain just for phpmyadmin. Is a seperate vhost really the 
only way to go?

Regards,
Samy





More information about the nginx mailing list