Mailinglist Archive: opensuse (4348 mails)

< Previous Next >
Re: [SLE] Problem with apache + mod_perl
  • From: zentara <zentara@xxxxxxxxxxx>
  • Date: Tue, 1 Oct 2002 12:34:24 -0400
  • Message-id: <20021001123424.713816b7.zentara@xxxxxxxxxxx>
On 01 Oct 2002 16:51:37 +0000
Stuart Urquhart <mangoman@xxxxxxxxxxxxxxxx> wrote:

> I am trying to get perl scripts working on the suse apache server....
>
> I have all the perl packages for apache installed, etc
> However, when i try and execute a perl script(on the web server), either
> of
> these things happen :
> 1) It gives me an internal server error (when executing an index.pl, e.g
> http://myserver/foofolder)
> 2) It gives me the perl script code (when specifying a perl script e.g
> http://myserver/foofolder/foo.pl)
>
> Php scripts work fine.
> I want to be able to use perl scripts in my webroot, and also my user
> folders...
>
> Can anyone help me?

It sounds like you httpd.conf needs tweaking.

<IfModule mod_dir.c>
DirectoryIndex index.html index.cgi index.php
</IfModule>

You can either name your index.pl to index.cgi or add
index.pl to the above list.

What happens now, is apache sees your index.pl as just some text
file and just sends it out.

There are other tricks you can use to get a cgi to run as index.
Like:
#use this to make an index.cgi for index.html
#<Files index.html>
# Options +ExecCGI
# SetHandler cgi-script
#</Files>

Good luck.





--
use Perl; #powerful programmable prestidigitation

< Previous Next >
References