Welcome! Log In Create A New Profile

Advanced

writing an alias to a proxy with no buffering

February 28, 2012 12:30PM
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@imavis.com <mailto://belloni@imavis.com>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

writing an alias to a proxy with no buffering

cristiano.belloni February 28, 2012 12:30PM

Re: writing an alias to a proxy with no buffering

Francis Daly February 28, 2012 01:30PM

Re: writing an alias to a proxy with no buffering

cristiano.belloni February 29, 2012 06:14AM

Re: writing an alias to a proxy with no buffering

Francis Daly February 29, 2012 02:28PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 245
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready