<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>writing an alias to a proxy with no buffering</title>
<description>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- &amp;quot;http://192.168.1.88/mjpeg&amp;quot;
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@imavis.com &amp;lt;mailto://belloni@imavis.com&amp;gt;
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx</description><link>http://forum.nginx.org/read.php?2,223127,223127#msg-223127</link><lastBuildDate>Wed, 19 Jun 2013 05:25:05 -0400</lastBuildDate>
<generator>Phorum 5.2.16</generator>
<item>
<guid>http://forum.nginx.org/read.php?2,223127,223185#msg-223185</guid>
<title>Re: writing an alias to a proxy with no buffering</title><link>http://forum.nginx.org/read.php?2,223127,223185#msg-223185</link><description><![CDATA[On Wed, Feb 29, 2012 at 12:13:14PM +0100, Cristiano Belloni wrote:<br />&gt; On 02/28/2012 07:29 PM, Francis Daly wrote:<br /><br />Hi there,<br /><br />&gt; It works, thank you. Can I ask how to translate location /stream0 to<br />&gt; /stream?s=0<br /><br />If you mean &quot;the client asks nginx for /stream0 and nginx asks the<br />proxy_pass host for /stream?s=0&quot;, then<br /><br />location = /stream0 {<br />proxy_buffering off;<br />proxy_pass http://unix:/tmp/demo_socket:/stream?s=0;<br />}<br /><br />should work. (But you may see odd things if the client asks for<br />/stream0?query=string.)<br /><br />I suspect that you will be better served by advertising the urls that<br />the proxy_pass host recognises, if that is possible.<br /><br />Good luck with it,<br /><br />f<br />--<br />Francis Daly francis@daoine.org<br /><br />_______________________________________________<br />nginx mailing list<br />nginx@nginx.org<br />http://mailman.nginx.org/mailman/listinfo/nginx]]></description>
<dc:creator>Francis Daly</dc:creator>
<category>Nginx Mailing List - English</category><pubDate>Wed, 29 Feb 2012 14:28:00 -0500</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?2,223127,223155#msg-223155</guid>
<title>Re: writing an alias to a proxy with no buffering</title><link>http://forum.nginx.org/read.php?2,223127,223155#msg-223155</link><description><![CDATA[On 02/28/2012 07:29 PM, Francis Daly wrote:<br />&gt; location /mjpeg {<br />&gt; proxy_buffering off;<br />&gt; proxy_passhttp://unix:/tmp/demo_socket:/;<br />&gt; }<br />It works, thank you. Can I ask how to translate location /stream0 to<br />/stream?s=0<br /><br />--<br />Belloni Cristiano<br />Imavis Srl.<br />www.imavis.com http://www.imavis.com<br />belloni@imavis.com &lt;mailto://belloni@imavis.com&gt;<br />_______________________________________________<br />nginx mailing list<br />nginx@nginx.org<br />http://mailman.nginx.org/mailman/listinfo/nginx]]></description>
<dc:creator>cristiano.belloni</dc:creator>
<category>Nginx Mailing List - English</category><pubDate>Wed, 29 Feb 2012 06:14:01 -0500</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?2,223127,223128#msg-223128</guid>
<title>Re: writing an alias to a proxy with no buffering</title><link>http://forum.nginx.org/read.php?2,223127,223128#msg-223128</link><description><![CDATA[On Tue, Feb 28, 2012 at 06:27:58PM +0100, Cristiano Belloni wrote:<br /><br />Hi there,<br /><br />&gt; I have a location in my nginx configuration file that connects to a unix<br />&gt; domain proxy to stream a real time video. What I would like is to make<br />&gt; other locations point to the stream. It seems that the right option for<br />&gt; this is the alias directive.<br /><br />&quot;alias&quot; is for static files rather than for proxying.<br /><br />&gt; location /stream {<br />&gt; proxy_buffering off;<br />&gt; proxy_pass http://unix:/tmp/demo_socket:/;<br />&gt; }<br />&gt;<br />&gt; location /mjpeg {<br />&gt; alias /stream;<br />&gt; }<br /><br />Does<br /><br />location /mjpeg {<br />proxy_buffering off;<br />proxy_pass http://unix:/tmp/demo_socket:/;<br />}<br /><br />do what you want?<br /><br />f<br />--<br />Francis Daly francis@daoine.org<br /><br />_______________________________________________<br />nginx mailing list<br />nginx@nginx.org<br />http://mailman.nginx.org/mailman/listinfo/nginx]]></description>
<dc:creator>Francis Daly</dc:creator>
<category>Nginx Mailing List - English</category><pubDate>Tue, 28 Feb 2012 13:30:00 -0500</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?2,223127,223127#msg-223127</guid>
<title>writing an alias to a proxy with no buffering</title><link>http://forum.nginx.org/read.php?2,223127,223127#msg-223127</link><description><![CDATA[Hi to everybody, beginner here.<br /><br />I have a location in my nginx configuration file that connects to a unix<br />domain proxy to stream a real time video. What I would like is to make<br />other locations point to the stream. It seems that the right option for<br />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 http://unix:/tmp/demo_socket:/;<br />}<br /><br />location /mjpeg {<br />alias /stream;<br />}<br /><br />}<br /><br />but, while the /stream location does the right thing, the /mjpeg<br />location seems to give back a 404:<br /><br />~$ wget --server-response -qO- &quot;http://192.168.1.88/mjpeg&quot;<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<br />could I accomplish this? (without redirecting, a lot of streaming<br />clients don't support redirect.)<br /><br /><br />Thank you,<br />Cristiano.<br /><br /><br />--<br />Belloni Cristiano<br />Imavis Srl.<br />www.imavis.com http://www.imavis.com<br />belloni@imavis.com &lt;mailto://belloni@imavis.com&gt;<br />_______________________________________________<br />nginx mailing list<br />nginx@nginx.org<br />http://mailman.nginx.org/mailman/listinfo/nginx]]></description>
<dc:creator>cristiano.belloni</dc:creator>
<category>Nginx Mailing List - English</category><pubDate>Tue, 28 Feb 2012 12:30:01 -0500</pubDate></item>
</channel>
</rss>