upstream with fastcgi_pass
Rapsey
rapsey at gmail.com
Fri Nov 23 00:23:47 MSK 2007
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
More information about the nginx
mailing list