I sort of have this working but not quite. I have http://mysite.com/music/play/song.mp3 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 http://mysite.com/music/download/song.mp3 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 {
    proxy_pass http://127.0.0.1:8000;
}

In thttpd.conf I have:
host=127.0.0.1
port=8000
dir=/www/cgi-bin
cgipat=/**

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.
_______________________________________________
nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to