Hello,
I'm using nginx 0.7.67 and Thttpd 2.25b from Debian Squeeze repositories.
Nginx conf for cgi :
location /cgi-bin {
proxy_pass http://127.0.0.1:8000;
}
/etc/thttpd/thttpd.conf :
port=8000
dir=/home/user/example.com
nochroot
user=www-data
cgipat=**.cgi
throttles=/etc/thttpd/throttle.conf
logfile=/var/log/thttpd.log
The cgi files are in /home/user/example.com/cgi-bin and sub-directories.
I'm testing the file at /home/user/example.com/cgi-bin/test.cgi with the following content :
#!/bin/sh
echo "Content-type: text/html"
echo
echo "Hello CGI World!"
Whenever the fire doesn't the executable permissions, thttpd serves out the file as text; but when it's made executable, it throws up a 500 error.