Upstream with fastcgi_pass

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

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

throws 404.
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

Well the thing is that requests that return HTML always succeed, only
X-Accel-Redirect responses fail with upstream.

Also the application always receives the request and sends it’s
response successfully.