Gossamer Forum
Quote Reply
Mod Perl
Hi,

My new server has ensim control panel which comes configured with mod perl. Every site on server acts in a chrooted environment.

I have so far failed to activate modperl for GMail. My admin.cgi lies in path /home/virtual/site2/fst/var/www/cgi-bin/admin21 and url is sitename/cgi-bin/admin21/admin.cgi and sitename/cgi-bin/user/login.cgi.

Here is what I have in httpd.conf (I added section bewteen ####):

<<<<<<<<<

<IfModule mod_perl.c>
Alias /perl/ /var/www/perl/
<Location /perl>
SetHandler perl-script
PerlHandler Apache::Registry
PerlSendHeader On
Options +ExecCGI
</Location>

####

<Location /cgi-bin/admin21>
SetHandler perl-script
PerlHandler Apache::Registry
PerlSendHeader On
Options +ExecCGI
</Location>



#######

</IfModule>

The mod perl startup file had the following content:

<<<<<<<

<IfModule mod_perl.c>
Alias /perl /home/virtual/site2/fst/var/www/perl
<Directory /home/virtual/site2/fst/var/www/perl>
Allow from All
AllowOverride All
Order allow,deny
Options +ExecCGI
</Directory>
SetEnv SITE_PERL /home/virtual/site2/fst/var/www/perl
</IfModule>

>>>>>>>>>



To which I added:

#########

<IfModule mod_perl.c>
<Directory /home/virtual/site2/fst/var/www/cgi-bin/admin21>
use lib '/home/virtual/site2/fst/var/www/cgi-bin/admin21';
use GMail::mod_perl;
</Directory>
</IfModule>

#########

But then apache fails to restart:

<<<<<<<<

Syntax error on line 14 of /etc/httpd/conf/site2/mod_perl:
Invalid command 'use', perhaps mis-spelled or defined by a module not included in the server configuration

>>>>>>>>>>>

If I comment out the 2 lines that start with use, then apache starts again.

Any idea what I am doing wrong?

Thanks

Frank
Quote Reply
Re: [frankLo] Mod Perl In reply to
Quote:
The mod perl startup file had the following content:

That's not your mod_perl startup file, that's part of your apache config. Look for a line that says:

PerlRequire /path/to/some/file

and then edit /path/to/some/file. If you don't see that line, add it in right above where you added the <Location> directive. Then in your startup file add:

#!/usr/bin/perl

use lib '/path/to/admin';
use GMail::mod_perl;

1;

and you should be set.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [frankLo] Mod Perl In reply to
Hey Alex,

Thanks for your reply. It worked great. Noticed already major improvement in speed.

And thanks for spam assassin too. That was a really valuable addition

Frank
Quote Reply
Re: [frankLo] Mod Perl In reply to
Hi Frank,

I also have a dedicate server using ensim ( from www.rackshack.net) . Can you please share your experience on how you get the GM working on Mod Perl.

Thank You

Wayne