Im want to configure apache2 running on Kubuntu to complete Perl CGI scripts. I have attempted some steps I discovered by searching, but nothing appears to operate. Can someone please point me right method of accomplishing this?


You will need to have a look at the apache error log to determine exactly what the "internal server error" is. The 4 probably cases, in my opinion could be:

  1. The CGI program is within a directory which doesn't have CGI execution enabled. Solution: Add the ExecCGI choice to that directory via either httpd.conf or perhaps a .htaccess file.

  2. Apache is just set up to operate CGIs from the devoted cgi-bin directory. Solution: Move the CGI program there or add an AddHandler cgi-script .cgi statement to httpd.conf.

  3. The CGI program isn't set as executable. Solution (presuming a *nix-type operating-system): chmod +x my_prog.cgi

  4. The CGI program is exiting without delivering headers. Solution: Run this program in the command line and verify that the) it really runs instead of dying having a compile-time error and b) it creates the right output, that ought to include, in the very miniumum, a Content-Type header along with a blank line following all of the its headers.

I am speculating you've reviewed mod_perl?

Perhaps you have attempted the next tutorial?

EDIT: With regards to this post - possibly training regimen an example from the code within your .cgi file. Possibly the first couple of lines?