reverse proxying video streaming

Hari Hendaryanto hari.h at csmcom.com
Wed Apr 13 14:38:25 MSD 2011


hi,

i've successfully reverse proxying streaming content through nginx.

this is my config

         location /stream/ {
             proxy_pass         http://xxx.xxx.xxx.xxx:8080/stream.flv;
             proxy_redirect     off;

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

open via browser http://www.example.com/stream/  success,without problem.

however, i need to append fake uri such as 
http://www.example.com/stream/stream/content.flv

here's what i've done so far

         location /stream/content.flv {
             proxy_pass         http://xxx.xxx.xxx.xxx:8080/stream.flv;
             proxy_redirect     off;

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

it's always pointed to /var/www/html/stream/content.flv

[error] 24546#0: *1 open() "/var/www/html/stream/content.flv" failed (2: 
No such file or directory)

any clues?

thanks

Powered By http://www.3g-net.net




More information about the nginx mailing list