What we have done, under mod_perl 2, is take advantage of the PerlOptions
+Parent flag.  This means that each Virtual Host has its own perl
interpreter (essentially).  Therefore you can have whatever @INC paths etc
you need, different versions of libraries.... whatever.  There is no danger
of inter-virtual host pollution.

For example:

<VirtualHost *:80>
       DocumentRoot /path/to/private/host
       ServerName virtual.host.name
       ErrorLog logs/thisHost_error_log
       CustomLog logs/thisHost_access_log common
       PerlOptions +Parent

       PerlRequire /path/to/private/host/masonStuff/MyHandler.pm
</VirtualHost>

We then set @INC in the MyHandler module.

Hope this helps.

On 3/25/07, Alex Robinson <[EMAIL PROTECTED]> wrote:

At 14:45 +0200 25/3/07, Antoine Farnault wrote:
Hi folks,
I'm quite new on mason... I just want to know if there is possible to
have multiple apache virtual host with multiple differents mason
configuration on them.

It seems there are some mod_perl problems with $m & $r which are
global variables.


$m and $r are global variables, but they only exist within and for
the length of a particular request. They cause no problems for having
multiple setups for different virtual hosts.

@INC, on the other hand, is shared between virtual hosts unless you
do something about it



http://perl.apache.org/docs/1.0/guide/config.html#Is_There_a_Way_to_Modify__INC_on_a_Per_Virtual_Host_or_Per_Location_Basis_

(though I believe this is simpler and better under Apache 2)

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users




--
Shane McCarron
[EMAIL PROTECTED]
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to