[Catalyst] Multi Mod_Perl apps
Fernan Aguero
fernan at iib.unsam.edu.ar
Wed Aug 8 15:16:54 GMT 2007
| Hi,
| Sorry if I post an old question, I just want to know if I could do this to run multi app on the same server under mod_perl:
|
|
| PerlSwitches -I/var/www/MyApp1/lib
| PerlModule MyApp1
|
| <Location />
| SetHandler modperl
| PerlResponseHandler MyApp1
| </Location>
|
| PerlSwitches -I/var/www/MyApp2/lib
| PerlModule MyApp2
|
| <Location />
| SetHandler modperl
| PerlResponseHandler MyApp2
| </Location>
|
| ------------
|
| My question is the PerlSwitches, will it get any error with that?
|
I vaguely remember having tried this and failed. Basically
you're setting PerlSwitches to two different values in the
same conf ... probably only the last declaration will stand.
The other problem is that you're setting different
PerlResponseHandlers for the same Location ...
Maybe you can have what you want by running three apache
servers on the same box?
1) a light apache (only minimal) running mod_proxy,
listening on port 80 and redirecting /myapp1 to localhost:81
and /myapp2 to localhost:82
ProxyPass /myapp1 http://localhost:81/myapp1
ProxyPassReverse /myapp1 http://localhost:81/myapp1
or just
ProxyPass /myapp1 http://localhost:81
ProxyPassReverse /myapp1 http://localhost:81
depending on how you configure your apache listening on :81
2) a mod_perl apache listening on port 81
PerlSwitches -I/var/www/MyApp1/lib
PerlModule MyApp1
<Location />
SetHandler modperl
PerlResponseHandler MyApp1
</Location>
3) a mod_perl apache listening on port 82
PerlSwitches -I/var/www/MyApp2/lib
PerlModule MyApp2
<Location />
SetHandler modperl
PerlResponseHandler MyApp2
</Location>
[These are just schematic examples to give you the big idea,
I'm running a similar setup with 1 proxy redirecting to 1
modperl (catalyst) + 1 modpython (trac/svn) and it works
fine. I haven't tried to run two catalyst apps (your case),
but it should work fine.]
Good luck,
Fernan
app
More information about the Catalyst
mailing list