Pass path to thttpd for CGI

Doc icantthinkofone at
Sat Mar 22 21:18:19 UTC 2014

I sort of have this working but not quite. I have and this plays fine in the browser 
by accessing the mp3 file in its folder. However, I want to handle 
requests to download the song at with a CGI script that has no 
extension (it's C). I can get /music/download to be handled by CGI in 
thttpd but I don't know how to handle the changing song titles cause 
everything I've tried fails.

location /music {
     try_files $uri.html $uri/index.html @music;

location @music {

In thttpd.conf I have:

And inside the cgi-bin is a standalone program called "download" so 
/music/download returns a web page generated by that executable  just to 
test this. I've tried so many variations including rewrite that I've 
gotten myself pretty turned around as to what I should be doing.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list