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.
HTTP/1.1 404 Not Found
Server: nginx/1.0.12
Date: Tue, 28 Feb 2012 17:07:30 GMT
Content-Type: text/html
Content-Length: 169
Connection: keep-alive
Do alias directives not work with the proxy module? If they don’t, how
could I accomplish this? (without redirecting, a lot of streaming
clients don’t support redirect.)
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 /mjpeg {
proxy_buffering off;
proxy_passhttp://unix:/tmp/demo_socket:/;
}
It works, thank you. Can I ask how to translate location /stream0 to
/stream?s=0