upstream with fastcgi_pass

Igor Sysoev is at rambler-co.ru
Fri Nov 23 11:54:21 MSK 2007


On Thu, Nov 22, 2007 at 10:23:47PM +0100, Rapsey wrote:

> I have 5 instances of a FCGI application. My config is like this:
> 
> upstream servercom {
>        server 127.0.0.1:44440;
>        server 127.0.0.1:44441;
>        server 127.0.0.1:44442;
>        server 127.0.0.1:44443;
>        server 127.0.0.1:44444;
>     }
> 
> 
> location ~ \.app$ {
>            fastcgi_pass servercom;
>            fastcgi_index stream.app;
>            fastcgi_param SCRIPT_FILENAME /var/www/htdocs$fastcgi_script_name;
>            include /etc/nginx/fastcgi.conf;
>         }
> 
> 
> The FCGI application uses X-Accel-Redirect to return a .flv video. The
> problem is that it only works for 1 file. After that, nginx always
> throws 404.
> 
> If I don't use upstream servercom and have fastcgi_pass like so:
> location ~ \.app$ {
>            fastcgi_pass 127.0.0.1:44440;
>            fastcgi_index stream.app;
>            fastcgi_param SCRIPT_FILENAME /var/www/htdocs$fastcgi_script_name;
>            include /etc/nginx/fastcgi.conf;
>         }
> 
> It will work fine and always return the file that the FCGI application
> sent by X-Accel-Redirect

It seems that you did not configure properly FCGI on
127.0.0.1:44441 - 127.0.0.1:44444


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list