Looking for help on fastcgi with different path
Artifex Maximus
artifexor at gmail.com
Thu Jun 18 16:50:25 MSD 2009
Hello!
2009/6/18 Igor Sysoev <is at rambler-co.ru>
> On Thu, Jun 18, 2009 at 01:41:43PM +0200, Artifex Maximus wrote:
>
> > Because of different path I need to generate a different
> > SCRIPT_FILENAME inside location /x/. But with this config file nginx
> > looks for /stat/x/... file instead of /stat/... file. How should I
> > solve this?
>
> 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;
> }
>
Tricky and perfect. Thank you!
> > Another question. Is there any global fastcgi setup as lighttpd has? I
> > mean that I give globally only the host, port, socket and other
> > parameters (like SCRIPT_FILENAME) are generated by nginx.
>
> There is no global fastcgi settings.
Is there any plan for implement? I'm just asking because it makes some
settings much more simple.
Bye,
Zsolt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20090618/8a643bd0/attachment.html>
More information about the nginx
mailing list