multiple instances of one web application

[prev] [thread] [next] [Date index for 2004/11/16]

From: Harald Meier
Subject: multiple instances of one web application
Date: 14:36 on 16 Nov 2004
------=_NextPart_000_0070_01C4CBF2.0138F290
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

dear group,

i am developing a web application using apache 2.0 and mod_perl 2.0.
the application is split into a couple of perl modules.

i would like to install the same application more than once on the same=20
web-server without changing the application code.

so
    http://www.foo.bar/myapp/instance1 calls instance 1
    http://www.foo.bar/myapp/instance2 calls instance 2
    ...

i have no idea how to handle the module/library problem to make sure =
that=20
each instance loads its own modules and if a module has changed, the =
correct=20
module is reloaded.

i  cannot use <VirtualServer> because the servername will always be the =
same.

my httpd.conf (works only for single instance):

   PerlSwitches -w -T -M/opt/myapp/instance1

   PerlModule      Apache::Reload
   PerlInitHandler Apache::Reload
   PerlSetVar      ReloadAll On

   <Location /myapp/instance1>
       SetHandler                     perl-script
       PerlResponseHandler     myapp
       PerlOptions                    +SetupEnv
   </Location>


thanks for your help!
harald.=20


------=_NextPart_000_0070_01C4CBF2.0138F290
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2523" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>dear group,<BR><BR>i am developing a web =
application using=20
apache 2.0 and mod_perl 2.0.<BR>the application is split into a couple =
of perl=20
modules.<BR><BR>i would like to install the same application more than =
once on=20
the same&nbsp;<BR>web-server without changing the application=20
code.<BR><BR>so<BR>&nbsp;&nbsp;&nbsp; <A=20
href=3D"http://www.foo.bar/myapp/instance1">http://www.foo.bar/myapp/inst=
ance1</A>=20
calls instance 1<BR>&nbsp;&nbsp;&nbsp; <A=20
href=3D"http://www.foo.bar/myapp/instance2">http://www.foo.bar/myapp/inst=
ance2</A>=20
calls instance 2<BR>&nbsp;&nbsp;&nbsp; ...<BR><BR>i have no idea how to =
handle=20
the module/library problem to make sure that&nbsp;<BR>each instance =
loads its=20
own modules and if a module has changed, the correct&nbsp;<BR>module is=20
reloaded.<BR><BR>i &nbsp;cannot use &lt;VirtualServer&gt; because the =
servername=20
will always be the same.<BR><BR>my httpd.conf (works only for single=20
instance):<BR><BR>&nbsp;&nbsp; PerlSwitches -w -T=20
-M/opt/myapp/instance1<BR><BR>&nbsp;&nbsp;=20
PerlModule&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Apache::Reload<BR>&nbsp;&nbsp;=20
PerlInitHandler Apache::Reload<BR>&nbsp;&nbsp;=20
PerlSetVar&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ReloadAll =
On<BR><BR>&nbsp;&nbsp;=20
&lt;Location =
/myapp/instance1&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
SetHandler&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
perl-script<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
PerlResponseHandler&nbsp;&nbsp;&nbsp;&nbsp;=20
myapp<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
PerlOptions&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
+SetupEnv<BR>&nbsp;&nbsp; &lt;/Location&gt;<BR><BR><BR>thanks for your=20
help!<BR>harald.&nbsp;<BR>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_0070_01C4CBF2.0138F290--

multiple instances of one web application
Harald Meier 14:36 on 16 Nov 2004

Re: multiple instances of one web application
Harald Meier 10:55 on 17 Nov 2004

Generated at 11:26 on 21 Dec 2004 by mariachi v0.52