apache2 on Ubuntu 11.04, and localhost is working. I created a simple printenv.pl script and put it in the following directory
$ mv printenv.pl /usr/lib/cgi-bin/ $ chmod +rx /usr/lib/cgi-bin/printenv.pl
However when I go to http://127.0.0.1/cgi-bin/printenv.pl, I get a 500 Internal Server Error
I checked the error log at
/var/log/apache2, and this is what it says:
[Mon Oct 24 11:04:25 2011] [error] (13)Permission denied: exec of '/usr/lib/cgi-bin/printenv.pl' failed [Mon Oct 24 11:04:25 2011] [error] [client 127.0.0.1] Premature end of script headers: printenv.pl
Any suggestions on how I can fix this and run CGI scripts on my localhost?