Setting up mod_perl

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I am trying to install and get mod_perl up and running.

Apache and perl versions are below:
[Mon Mar 10 11:10:50 2008] [notice] Apache/2.2.8 (Unix) mod_perl/2.0.3
Perl/v5.8.5 configured -- resuming normal operations

This is the error I see in apache error_log when firefox tries to open
[Mon Mar 10 11:10:55 2008] [error] [client] (13)Permission
denied: access to /perl/ denied
[Mon Mar 10 11:11:04 2008] [error] [client] (13)Permission
denied: access to /perl/ denied

Firefox shows this error:
You don't have permission to access /perl/ on this

The file is just the bare minimal perl file from
the mod_perl tutorial.
#!/usr/bin/perl -w
print "Content-type: text/plain\n\n";
print "mod_perl rules!\n";

Relevant (acc. to me) parts of httpd.conf are below:
<Directory "/usr/local/apache2/cgi-bin">
    AllowOverride None
    #Options None
    Options +ExecCGI
    Order allow,deny
    Allow from all

<IfModule mime_module>
    AddHandler cgi-script .cgi .pl

Alias /perl /home/<uname>/modperl
<Directory /home/<uname>/modperl>
    SetHandler perl-script
    PerlResponseHandler ModPerl::Registry
    PerlOptions +ParseHeaders
    Options +ExecCGI

Anyone have any clues what is going wrong with my apache/modperl

as a note: While installing modperl, 1 test failed out of some 3000+
tests...I moved on with the installation since I didnt quite
understand the error. I don't know where to find details of that
failed test (i may have to install modperl again? or just run make
test again). Let me know if you need to know about this failed
test...till then i will try to find out how to get at the test report
to find out which one failed.

Thanks in advance for your inputs,

Re: Setting up mod_perl wrote:
Quoted text here. Click to load it
Quoted text here. Click to load it

This has to do with apache, not perl.. but..

If that's the exact entry, then you need to put the actual
directory there instead of '/home/<uname>/modperl'  e.g.
if 'user1' is your username and the directory containing
your script is '/home/user1/modperl':

Alias /perl /home/user1/modperl
<Directory /home/user1/modperl> ...

Both /home/user1 and /home/user1/modperl need to be executable
by the user running the web server. Also, the script residing there
needs to be executable by that user. Without knowing that username,
you could make them all executable:

chmod 755 /home/user1 /home/user1/modperl

Quoted text here. Click to load it

Site Timeline