CGI Perl

Dieter Schicker dieter.schicker at
Sat Sep 23 13:38:49 UTC 2006

Emil Edeholt wrote:
> Hi,
> I can't get CGI Perl up and running and I don't have a clue what to do. 
> Apache 2 and PHP works fine. I've uncomment AddHandler cgi-script .cgi 
> and perl is installed. But I guess something more is needed?
> Apache gives me an forbidden error when I try to run my example script. 
> I've tried to 777 the script but I still get the error. Any ideas?
> And btw under what user is apache 2 running normally in ubuntu?
> My test script looks like this, and it works fine to run it from the 
> terminal, so atleast perl is working:
> #!/usr/bin/perl
> use strict;
> print "Test\n";
> All ideas are welcome. Thanks!
> Kind regards Emil

I'm just guessing because you didn't provide your apache conf.
You have to set "ExecCGI" option for the directory your script lives.

<directory /path/to/cgi/directory>
   Options ExecCGI

777 is not a good idea, 755 is totally sufficient.

Hope that helps

More information about the ubuntu-users mailing list