Alexander Shipitsyn wrote:
 > Friends, whether and at you arose the following problem:
 >
 > By the same machine we have 2 different virtual sites; their files are
 > located in different catalogues.
 >
 > In http.conf full freedom for .htaccess is given.
 >
 > Configuration Apache::ASP occurs through .htaccess #1 for a site #1
 > and .htaccess #2 for a site #2.

This is typical when modules of the same name are located
if different places, for example, for both sites the modules
used are:

   use SiteConfig.pm

Because the perl interpreter is shared globally across sites,
after site 1 module loads, site 2 will use it if it is
the same name.  One way around this is to have all the
local site config data in the local global.asa.  Another
is to have a per site naming convention like:

   use Site1::Config.pm;
   use Site2::Config.pm;

or other way around:

   use Config::Site1;
   use Config::Site2;

It may be that this works if you subclass off a base class.

You can also consider more drastic measures like

   MaxRequestsPerChild 1

or doing a &CORE::exit(); in a Apache->register_cleanup()
to kill the process after executing.  But this
might defeat much of the point of using mod_perl.

--Josh

> 
> ---------------------------------------------------------------------
> And so, scripts, executed on a site #2, for some reason see modules
> .pm which are used only on a site #1.
> ---------------------------------------------------------------------
> 
> .htaccess #1 location: /home/site1/site/docs/.htaccess
> .htaccess #1 content: PerlSetVar Global/home/site1/site/lib/pm
> 
> .htaccess #2 location: /home/site2/site/docs/.htaccess
> .htaccess #2 content: PerlSetVar Global/home/site2/site/lib/pm
> 
> 
> httpd.conf:
> 
> PerlWarn On
> 
> <VirtualHost *>
>  ServerName linux.domain.xx
>  DocumentRoot /usr/local/apache/htdocs
> </VirtualHost>
> 
> <VirtualHost *>
>  ServerName site1.domain.xx
>  DocumentRoot /home/site1/site/docs
>  ErrorLog /usr/local/apache/logs/site1_error_log
> </VirtualHost>
> 
> <Directory /home/site1/site/docs>
>  Options All
>  AllowOverride All
> </Directory>
> 
> <VirtualHost *>
>  ServerName site2.domain.xx
>  DocumentRoot /home/site2/site/docs
>  ErrorLog /usr/local/apache/logs/site2_error_log
> </VirtualHost>
> 
> <Directory /home/site2/site/docs>
>  Options All
>  AllowOverride All
> </Directory>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to