reverse proxying video streaming

Francis Daly francis at daoine.org
Wed Apr 13 15:30:50 MSD 2011


On Wed, Apr 13, 2011 at 05:38:25PM +0700, Hari Hendaryanto wrote:

Hi there,

> i've successfully reverse proxying streaming content through nginx.

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

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

So: the browser asks nginx for /stream/, nginx asks the backend for
/stream.flv, and things work happily.

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

The browser asks nginx for /stream/stream/content.flv. With
the above configuration, nginx asks the backend for
/stream.flvstream/content.flv. That doesn't work for you.

So: what url do you want nginx to ask the backend for?

> here's what i've done so far
> 
>         location /stream/content.flv {

This location doesn't match your request, so won't be used.

> any clues?

The debug log will show which location{} block is used for this request.

But before that: decide what you want nginx to ask the backend for,
and see if http://wiki.nginx.org/HttpProxyModule#proxy_pass shows you
how to achieve that.

Good luck with it,

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list