Welcome! Log In Create A New Profile

Advanced

Re: Looking for help on fastcgi with different path

July 29, 2009 10:25AM
Igor Sysoev Wrote:
-------------------------------------------------------
....
>
> An "alias" is incorrectly inherited in nested
> locations.
> This is the reason why the nested locations are
> still not officially
> supported. Probably this will help:
>
> location ~ ^/x/(.+\.php)$ {
> alias /stat/$1;
> fastcgi_pass 127.0.0.1:9000;
> fastcgi_index index.php;
> fastcgi_param SCRIPT_FILENAME
> $request_filename;
> include fastcgi_params;
> }

Actually, it works perfectly well with both the fastcgi_pass and fastcgi_index parameters residing in the fastcgi_params file instead of the nginx.conf file.
In fact, you can even put the SCRIPT_FILENAME inside the fastcgi_params file too, as long as you don't need to set the root on nested locations.


nginx.conf file:
[code]location ~ ^/x/(.+\.php)$ {
alias /stat/$1;
fastcgi_param SCRIPT_FILENAME $request_filename;
include fastcgi_params;
}[/code]

fastcgi_params:
[code]
....
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
[/code]






> There is no global fastcgi settings.
But we're getting very close...
Subject Author Posted

Looking for help on fastcgi with different path

Artifex Maximus June 18, 2009 07:41AM

Re: Looking for help on fastcgi with different path

Igor Sysoev June 18, 2009 07:55AM

Re: Looking for help on fastcgi with different path

Artifex Maximus June 18, 2009 08:50AM

Re: Looking for help on fastcgi with different path

morten July 29, 2009 10:25AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 283
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready