Using compiled from source Nginx 0.6.31 to stream flv

Thomas iamkenzo at
Thu Jun 26 16:47:01 MSD 2008

Hi list,

I was able to stream flv files on my local dev machine, but now that I
moved to a remote server, I get the following error message when
trying to scrub through my video using FLV media player:

[warn] 4669#0: *75 an upstream response is buffered to a temporary
file /usr/local/nginx/proxy_temp/5/00/0000000005 while reading
upstream, client: xx.xx.xx.xx, server: nginx, request: "GET
/videos/some-video.flv?start=2706564 HTTP/1.1", upstream:
"", host:

And the video starts back at the beginning. What is going on? And what
does the error message mean?

I remember Igor saying that the streamed flv must be a static file and
cannot be proxied, is that what's happening to me? But I have in my
config file, rules that are supposed to serve directly static files
from the hard drive.

My setup is as following:
1) Nginx 0.6.31 compiled from source
2) Rails app running on a VM at IP
3) Nginx running on a VM at IP
4) The host server redirects packets to the Nginx VM, which then
redirects them to the Rails VM
5) The public folder of rail where the video resides is actually an
NFS folder shared by the Nginx VM, so Nginx has direct access to the
flv files on the hard drive.

Here is my configuration file for serving static content:
upstream my_app {
  server weight=2;

  location / {
    root      /home/thomas/rails_apps/my_app/public;
    index     index.html index.htm;

    proxy_redirect      off;

    proxy_set_header    X-Real-IP $remote_addr;
    proxy_set_header    X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header    Host $http_host;

    if (-f $request_filename) {

    if (-f $request_filename/index.html) {
      rewrite (.*) $1/index.html break;

    if (-f $request_filename.html) {
      rewrite (.*) $1.html break;

    if (!-f $request_filename) {
      proxy_pass http://my_app;
  } # End of the location /

  location ~ /videos/\.flv$ {
    root  /home/thomas/rails_apps/my_app/public/videos;
  } # End of location

Best regards,

More information about the nginx mailing list