Welcome! Log In Create A New Profile

Advanced

Pass path to thttpd for CGI

Doc
March 22, 2014 05:20PM
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
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Pass path to thttpd for CGI

Doc March 22, 2014 05:20PM

Re: Pass path to thttpd for CGI

Francis Daly March 24, 2014 09:30AM

Re: Pass path to thttpd for CGI

Doc March 24, 2014 10:22AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 154
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