4 messages in ru.sysoev.nginxRe: upstream with fastcgi_pass
FromSent OnAttachments
RapseyNov 22, 2007 1:23 pm 
Igor SysoevNov 23, 2007 12:53 am 
RapseyNov 23, 2007 7:28 am 
RapseyNov 23, 2007 7:31 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: upstream with fastcgi_passActions...
From:Rapsey (raps@public.gmane.org)
Date:Nov 23, 2007 7:28:59 am
List:ru.sysoev.nginx

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

On Nov 23, 2007 9:54 AM, Igor Sysoev
<is-G@public.gmane.org> wrote:

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