Full pathname not sent

This might be more of a regex problem on my part than nginx. I do a
rewrite to pass the full pathname to thttpd like this:

location ~ /radio/download/.*.mp3$ {
rewrite ^ /test/$1;
}

location /test {
proxy_pass http://127.0.0.1:8000;
}

However the pathname received by thttpd is /test/ without the mp3
filename.

On Sun, Mar 23, 2014 at 12:03:25PM -0400, Doc wrote:

Hi there,

This might be more of a regex problem on my part than nginx.

Yes, it is.

I do a
rewrite to pass the full pathname to thttpd like this:

location ~ /radio/download/.*.mp3$ {
rewrite ^ /test/$1;
}

What value do you want $1 to have?

What does nginx (and pretty much every regex tool) think $1 is?

You’ll probably want () in there somewhere. Look for “capture” in
the manual.

Good luck with it,

f

Francis D. [email protected]