Welcome! Log In Create A New Profile

Advanced

Thttpd: all cgi files return 500 error

Posted by Ellimist 
Thttpd: all cgi files return 500 error
April 14, 2011 09:03AM
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.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

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