I am trying to make a portable mod_perl.conf.  I have things like:

Alias /cgi-bin/chimpkit/   /usr/local/apache/cgi-bin/chimpkit/
<Location /cgi-bin/chimpkit/>
     SetHandler perl-script
     PerlHandler Apache::Registry
     Options +ExecCGI
     PerlSendHeader On
</Location>

which really needs to become something like:

Alias /cgi-bin/chimpkit/   $SERVER_ROOT/cgi-bin/chimpkit/
etc...

I don't think I can do this directly with Apache but I found a random 
newsgroup thread that suggested something like the following might work:

<Perl>
push @PerlConfig, <<EOF
   Alias /cgi-bin/chimpkit/   $ENV{'SERVER_ROOT'}/cgi-bin/chimpkit/ 

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

Is this a good way to solve this problem, is there an easier way, and 
does this even work?  :-)

Thanks,
Fran

Reply via email to