[wplug] executing perl cgi scripts with apache2 on debian
Poyner, Brandon
bpoyner at ccac.edu
Wed Jul 14 10:32:29 EDT 2004
I think you're using <Location> when you should be using <Directory>.
That or change the <Location> to match the URL.
http://httpd.apache.org/docs-2.0/mod/core.html#location
Brandon Poyner
Network Engineer II
CCAC - College Office
412-237-3086
-----Original Message-----
From: John Harrold [mailto:jmh17 at pitt.edu]
Sent: Wednesday, July 14, 2004 10:24 AM
To: western PA LUG
Subject: [wplug] executing perl cgi scripts with apache2 on debian
I've recently moved our webserver over to debian from redhat and I
cannot
for the life of me get it to execute our cgi scripts. I created a test
script to figure things out. The test script looks like
<script file_name=/tmp/perltest/myfile.pl>
#! /usr/bin/perl
use strict;
use warnings;
use CGI qw/:standard/;
use CGI::Carp qw(fatalsToBrowser);
print header,
start_html('A Simple Example'),
h1('A Simple Example'),
</script>
And in /etc/apache2/conf.d/mainsite I added
<Location /tmp/perltest>
Options All
AllowOverride All
AddHandler cgi-script .pl
</Location>
ScriptAliasMatch ^/perltest/
"/tmp/perltest/myfile.pl"
ScriptAliasMatch ^/perltest
"/tmp/perltest/myfile.pl"
Now whenever I try to access the script with a browser
http://site/perltest/
the web server returns something with a mime type 'test/x-perl'. I can
execute
te perl script from the command line as the webservers user. I seem to
recall
that the path to the script and the script must have permissions 0755,
so I
made sure that was correct. I still cannot get apache to execute our
scripts.
Can anyone offer any advice here?
--
----------------------------------------------------------
| /"\
john harrold | \ / ASCII ribbon campaign
jmh at member.fsf.org | X against HTML mail
the most useful idiot | / \
----------------------------------------------------------
What difference does it make to the dead, the orphans,
and the homeless, whether the mad destruction is brought
under the name of totalitarianism or the holy name of
liberty and democracy?
--Gandhi
----------------------------------------------------------
gpg --keyserver keys.indymedia.org --recv-key F65A739E
----------------------------------------------------------
More information about the wplug
mailing list