<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi to everybody, beginner here.<br>
<br>
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.<br>
<br>
So, I have a configuration like this:<br>
<br>
server {<br>
listen 80;<br>
server_name localhost;<br>
<br>
location /stream {<br>
proxy_buffering off;<br>
proxy_pass <a class="moz-txt-link-freetext" href="http://unix:/tmp/demo_socket:/">http://unix:/tmp/demo_socket:/</a>;<br>
}<br>
<br>
location /mjpeg {<br>
alias /stream;<br>
}<br>
<br>
}<br>
<br>
but, while the /stream location does the right thing, the /mjpeg
location seems to give back a 404:<br>
<br>
~$ wget --server-response -qO- <a class="moz-txt-link-rfc2396E" href="http://192.168.1.88/mjpeg">"http://192.168.1.88/mjpeg"</a><br>
<br>
HTTP/1.1 404 Not Found<br>
Server: nginx/1.0.12<br>
Date: Tue, 28 Feb 2012 17:07:30 GMT<br>
Content-Type: text/html<br>
Content-Length: 169<br>
Connection: keep-alive<br>
<br>
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.)<br>
<br>
<br>
Thank you,<br>
Cristiano.<br>
<br>
<br>
<div class="moz-signature">-- <br>
<title></title>
Belloni Cristiano<br>
Imavis Srl.<br>
<a href="http://www.imavis.com">www.imavis.com</a><br>
<a href="mailto://belloni@imavis.com">belloni@imavis.com</a><br>
</div>
</body>
</html>