I'm trying to use nginx to proxy a request with parameters to a shoutcast stream. I've tried a couple things but can't seem to get it working right. First try was this
location /music/ {
proxy_pass http://dest.server.net/$1$is_args$args;
}
That resulted in the following log:
2015/02/25 17:37:32 [error] 12183#0: *1 no resolver defined to resolve dest.server.net, client: 1.2.3.4, server: myserver.org, request: "GET /full/path/1/foo/bar.pls?p1=1&p2=2 HTTP/1.1", host: "myserver.org"
When I add a resolver:
location /music/ {
resolver 8.8.8.8;
proxy_pass http://dest.server.net/$1$is_args$args;
}
It seems to not try to proxy the request at all:
2015/02/25 17:42:34 [error] 12106#0: *3 open() "/full/path/1/foo/bar.pls" failed (2: No such file or directory), client: 1.2.3.4, server: myserver.org, request: "GET /full/path/1/foo/bar.pls?p1=1&p2=2 HTTP/1.1", host: "myserver.org"
If it needs to be accessed on my server with full path/parameters that would work, just need to pass those off to the real server.
Any suggestions on making this work?
/music/
location, but/full/path/1/...
in logs. Please, if you try to hide real URIs do this consistently.$1
come from ? It's probably an empty string considering excerpts you gave us. Post the whole configuration file.