Gossamer Forum
Home : Products : Gossamer Mail : Discussion :

Mod_perl in the httpd.conf file with virtual hosts

Quote Reply
Mod_perl in the httpd.conf file with virtual hosts
I have installed mod_perl on my server and I have successfully been able to load the http://www.mydomain.com/perl-status file, which should mean that mod_perl is up and running, if I'm not mistaken. This on the main domain and when I try it on a virtual host it also works. However whe I set up the below for a virtual host, outside the virtual host code in the main part of the httpd.conf file it doesn't seem to work.

I followed the indications to have :
1) <Location /url/to/gmail>
SetHandler perl-script
PerlHandler Apache::Registry
PerlSendHeader On
Options +ExecCGI
</Location>
in the httpd.conf file

2) Creating a startup file for perl with :
#!/usr/bin/perl5

$ENV{GATEWAY_INTERFACE} =~ /^CGI-Perl/ or die "GATEWAY_INTERFACE not Perl!";

use lib '/url/to/gmail/admin';

use GMail::mod_perl;

3) Add reference to this file in the httpd.conf file with a PerlRequire command :

PerlRequire /path/to/startup.pl

However I just get Internal Server Errors.

By the way why isn't it possible to have this type of code in the httpd.conf file :

PerlRequire /home/www/init.pl

<Directory /home/www/docs>
DirectoryIndex login
SetHandler perl-script
PerlHandler Apache::Registry
Options +ExecCGI
</Directory>

Would it be possible to have :
use lib qw( /url/to/gmail/admin )
this being the directory where the GMail::mod_perl file is, in the start file ?

Can anybody help me on this one ?

Jag
Significant Media
Subject Author Views Date
Thread Mod_perl in the httpd.conf file with virtual hosts Jag 2010 Nov 17, 2001, 3:17 PM
Thread Re: [Jag] Mod_perl in the httpd.conf file with virtual hosts
Alex 1955 Nov 17, 2001, 6:02 PM
Thread Re: [Alex] Mod_perl in the httpd.conf file with virtual hosts
Jag 1951 Nov 18, 2001, 2:44 AM
Post Re: [Jag] Mod_perl in the httpd.conf file with virtual hosts
Jag 1899 Nov 18, 2001, 4:50 AM