writing an alias to a proxy with no buffering

Francis Daly francis at daoine.org
Tue Feb 28 18:29:01 UTC 2012


On Tue, Feb 28, 2012 at 06:27:58PM +0100, Cristiano Belloni wrote:

Hi there,

> I have a location in my nginx configuration file that connects to a unix 
> domain proxy to stream a real time video. What I would like is to make 
> other locations point to the stream. It seems that the right option for 
> this is the alias directive.

"alias" is for static files rather than for proxying.

>   location /stream {
>     proxy_buffering off;
>     proxy_pass http://unix:/tmp/demo_socket:/;
>   }
> 
>   location /mjpeg {
>       alias /stream;
>   }

Does

  location /mjpeg {
    proxy_buffering off;
    proxy_pass http://unix:/tmp/demo_socket:/;
  }

do what you want?

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list