I'm a newbie to Turnkey and have just set up LAMP as a virtual development environment for a website I support. Everything works great, except that the website uses cgi programs and I want to configure LAMP to run them. The cgi scripts are in directory /var/www/SITENAME/privat.
Reading some other posts on the forum I changed the configuration for the default apache site to:
AddHandler cgi-script .cgi
But when running cgi script from the browser I get a 500 Internal Server Error and the apache logs says:
[error] [client IP] (2)No such file or directory: exec of '/var/www/SITENAME/privat/index.cgi' failed, referer: http://IP/SITENAME/
[Mon Feb 08 10:20:18 2010]
[error] [client IP] Premature end of script headers: index.cgi, referer: http://IP/SITENAME/
Any suggestions as to what I'm doing wrong would be appreciated.