[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: mod_perl Not Working W/ Apache2 on Sid



On Monday 03 April 2006 18:34, Hal Vaughan wrote:
> I'm just trying to run a simple test set up, so I don't have to keep
> uploading every little change to my web server.  I've had Apache2
> working for a while, and today I added mod_perl (aptitude install
> libapache2-mod-perl2).  My /etc/apache2/mods-enabled/perl.load looks
> like this:
>
> LoadModule perl_module /usr/lib/apache2/modules/mod_perl.so
>
> <Directory /perl >
>    SetHandler  perl-script
>    PerlHandler ModPerl::Registry
>    Options +ExecCGI
> </Directory>
>
> (I saw a sample with another line in it, after the first line
> (PerlModule Apache2) but Apache2 would not load with that line
> included.)
>
> The root server directory is /var/www and I have a perl script
> in /var/www/perl.  When I try to access it with Firefox, it tries to
> download it instead of the script being executed.  I've tried
> changing the directory do /var/www/perl in the config, but that
> doesn't help.
>
> (I use /etc/init.d/apache2 force-reload between each test.)
>
> All I want to do is test a few simple scripts on my local system and
> make sure they're working before I put them on a server.  I don't
> need anything fancy, I'm not worried about speed.  I just need them
> to run.
>
> What is wrong or mis-configured?  Any suggestions?
>
> Thanks!
>
> Hal

After a number of different attempts, I had to purge apache2, 
apache2-common, lib-apache2-mod-perl2, make sure all config files were 
deleted, then re-install them with aptitude, and use the following for 
perl.load for config:

LoadModule perl_module /usr/lib/apache2/modules/mod_perl.so
PerlModule Apache2

<Location /perl >
        SetHandler perl-script
        PerlResponseHandler ModPerl::Registry
        PerlOptions +ParseHeaders
        Options +ExecCGI
</Location>

I also had to do this:

ln -s /usr/lib/perl5/Bundle/Apache2.pm /usr/lib/perl5/Apache2.pm

Even though Apache2.pm was in a subdirectory, it wasn't working until I 
made the link.  I'm a little puzzled as to why Aptitude didn't take 
care of most of this for me -- but, then again, I am running Sid.

Hal



Reply to: