Problems with fastcgi php migration

Ian M. Evans ianevans at
Thu Mar 13 15:53:35 MSK 2008

Igor Sysoev wrote:
> The "if" block is ugly construction inside nginx.
> It requires fastcgi_pass inside "if" block too.
> It's not enough fastcgi_pass at the bottom of the location.

It's now in both places and there's no change. All the root level files 
( work. 99% there as we just need to be to find the 
filename in any directory.

To reiterate, the only final tweak now is the location regex.

location ~ ^/(testgalleries|galleries|poll|news|photos)(/|$) {

Like I said, I suck at regex, but from what I do understand, the

^/ is looking at the start of the line so it will find
/photos but not /subdir/photos or /subdir/subdir/photos (etc.)

what needs to be changed between ^/ and (testgalleries...) to enable it 
to work with any number of subdirectories?


More information about the nginx mailing list