writing an alias to a proxy with no buffering
Cristiano Belloni
belloni at imavis.com
Tue Feb 28 17:27:58 UTC 2012
Hi to everybody, beginner here.
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.
So, I have a configuration like this:
server {
listen 80;
server_name localhost;
location /stream {
proxy_buffering off;
proxy_pass http://unix:/tmp/demo_socket:/;
}
location /mjpeg {
alias /stream;
}
}
but, while the /stream location does the right thing, the /mjpeg
location seems to give back a 404:
~$ wget --server-response -qO- "http://192.168.1.88/mjpeg"
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.)
Thank you,
Cristiano.
--
Belloni Cristiano
Imavis Srl.
www.imavis.com <http://www.imavis.com>
belloni at imavis.com <mailto://belloni@imavis.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20120228/559ffc67/attachment.html>
More information about the nginx
mailing list