Java Mailing List Archive

http://www.apache-httpd.com/

Home » modperl.perl »

Problems with SetEnv and Alias

Geoff Toogood

2009-05-25

Replies: Find Java Web Hosting

Author LoginPost Reply
Hi Guys,

This has most likely been answered before but I have to ask as I have searched this mailing list and can't find the answer I am looking for. It is also most likely in the mod_perl 2,0 documentation and if there is a relevant part of it you can point me to regarding my issue that would be good!

I am running mod_perl 2 on a debian server using apache2

I have a <VirtualHost> directive which incorporates a mod_perl PerlTransHandler. This VirtualHost block of the config also has some Alias and SetEnv directives defined.

The PerlTransHandler module behaves correctly and works well but it seems that when I execute a PHP document under this VirtualHost I lose the $_SERVER (%ENV in perl) variables and Alias settings I have set in the Apache VirtualHost block of my config.

Attached is my PerlTransHandler and my PerlFixupHandler as well as my Apache configuration.

--
Kind regards,
Geoff T

 


Geoff Toogood
Analyst / Programmer & System Administration

a: Level 5, 128 Bundall Rd, Bundall QLD 4217, Australia
t: +61 7 5574 0681   f: +61 7 5574 0932
e: geoff@allotz.com
w: www.allotz.com

Allotz is a proud member of the following associations...

Hospitality Sales and Marketing Association International - Asian American Hotel Owners Association - American Hotel & Lodging Association - The OpenTravel Alliance
Allotz.com limited - Seriously Smart Travel Technology

Attachment: cid:part1.03020202.09030808@allotz.com


Attachment: cid:part2.03010900.07090605@allotz.com

<VirtualHost *:80>

 ServerName www.test.com
 ServerAlias www.test.com
 ServerAdmin webmaster@(protected)

 <Perl>
   use lib '/etc/SysAdmin/perl5/Handlers/';
 </Perl>

 DocumentRoot /vhosts/www/htdocs/
 CustomLog /vhosts/www/logs/http-accesslog combined
 ErrorLog /vhosts/www/logs/http-errorlog

 PerlTransHandler +MyTransHandler
 PerlFixupHandler +MyFixUpHandler
   
 PerlSetEnv ConfigPath /etc/SysAdmin/perl5/
    Alias /css/main.css /etc/SysAdmin/PrivateLabel/trunk/2/css/main.css
 
</VirtualHost>



Attachment: MyFixUpHandler.pm (zipped)
Attachment: MyTransHandler.pm (zipped)
©2008 apache-httpd.com - Jax Systems, LLC, U.S.A.