You are here
Hi,
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:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/
<Directory "/var/www/SITENAME/privat/">
Options +ExecCGI
AddHandler cgi-script .cgi
</Directory>
LogLevel error
</VirtualHost>
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.
Regards, /Johan
Bump!
Having this issue as well. Why doesn't CGI work out of the box on LAMP?
Sorry for the late reply
Test CGI script
Tell apache about cgi-bin
This was the missing part of
This was the missing part of the puzzle and it did solve our problems. THANKS A LOT!
It should be included in current appliances
This thread is quite old. See Alon's comment above:
Thanks for reporting...
However, it should "just work"! But you are right. I just tested it and confirmed that it doesn't!
I have lodged an issue on our tracker.
[update] Here's the specifics to get the example cgi script working.
Add new comment