FAQ
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?

Thank you


---------------------------------
Got a little couch potato?
Check out fun summer activities for kids.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20070808/f9ea380d/attachment.htm

Search Discussions

  • Chisel Wright at Aug 8, 2007 at 2:23 pm

    On Wed, Aug 08, 2007 at 06:14:54AM -0700, Will Smith wrote:
    My question is the PerlSwitches, will it get any error with that?
    Dunno - do you get errors when *you* try it?

    --
    Chisel Wright
    e: chisel@herlpacker.co.uk
    w: http://www.herlpacker.co.uk/

    I may be a pretty sad person, but I don't make jokes in base 13.
  • Fernan Aguero at Aug 8, 2007 at 3:14 pm

    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
  • Adam Sjøgren at Aug 8, 2007 at 3:59 pm

    On Wed, 8 Aug 2007 06:14:54 -0700 (PDT), Will wrote:

    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>
    Assuming that the <Location>-parts are in different virtual hosts (and
    not as shown verbatim above), yes; that is what I do.

    My site-configuration files basically looks like this (stuff omitted at
    [...] for brevity):

    ,----[ /etc/apache2/sites-enabled/010-www.kammeratadam.dk ]
    PerlSwitches -I/var/www/www.kammeratadam.dk/lib
    PerlModule KammeratAdam

    <VirtualHost *>
    ServerName www.kammeratadam.dk
    [...]

    <Location />
    SetHandler modperl
    PerlResponseHandler KammeratAdam
    ExpiresDefault "access plus 10 minutes"
    </Location>

    <Location /grafik/>
    SetHandler None
    ExpiresDefault "access plus 1 week"
    </Location>
    [...]
    </VirtualHost>
    `----

    ,----[ /etc/apache2/sites-enabled/010-www.vantbanken.se ]
    PerlSwitches -I/var/www/www.vantbanken.se/lib
    PerlModule Vantbanken

    <VirtualHost *>
    ServerName www.vantbanken.se
    [...]

    <Location />
    SetHandler modperl
    PerlResponseHandler Vantbanken

    AuthType Basic
    AuthName "Not open yet"
    AuthUserFile /var/www/www.vantbanken.se/conf/stats
    Require valid-user
    </Location>
    [...]
    </VirtualHost> `----
    My question is the PerlSwitches, will it get any error with that?
    Not unless your apps have different local modules with the same names,
    I'd guess?


    Best regards,

    Adam

    --
    "KOMPRESSOR crush american burger" Adam Sj?gren
    asjo@koldfront.dk
  • Will Smith at Aug 9, 2007 at 2:46 pm
    Thank you all you for your help.

    Best Regards,

    Will

    Adam Sj?gren wrote: On Wed, 8 Aug 2007 06:14:54 -0700 (PDT), Will wrote:
    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
    SetHandler modperl
    PerlResponseHandler MyApp1
    PerlSwitches -I/var/www/MyApp2/lib
    PerlModule MyApp2
    SetHandler modperl
    PerlResponseHandler MyApp2
    Assuming that the -parts are in different virtual hosts (and
    not as shown verbatim above), yes; that is what I do.

    My site-configuration files basically looks like this (stuff omitted at
    [...] for brevity):

    ,----[ /etc/apache2/sites-enabled/010-www.kammeratadam.dk ]
    PerlSwitches -I/var/www/www.kammeratadam.dk/lib
    PerlModule KammeratAdam


    ServerName www.kammeratadam.dk
    [...]


    SetHandler modperl
    PerlResponseHandler KammeratAdam
    ExpiresDefault "access plus 10 minutes"



    SetHandler None
    ExpiresDefault "access plus 1 week"

    [...]
    `----

    ,----[ /etc/apache2/sites-enabled/010-www.vantbanken.se ]
    PerlSwitches -I/var/www/www.vantbanken.se/lib
    PerlModule Vantbanken


    ServerName www.vantbanken.se
    [...]


    SetHandler modperl
    PerlResponseHandler Vantbanken

    AuthType Basic
    AuthName "Not open yet"
    AuthUserFile /var/www/www.vantbanken.se/conf/stats
    Require valid-user

    [...] `----
    My question is the PerlSwitches, will it get any error with that?
    Not unless your apps have different local modules with the same names,
    I'd guess?


    Best regards,

    Adam

    --
    "KOMPRESSOR crush american burger" Adam Sj?gren
    asjo@koldfront.dk

    _______________________________________________
    List: Catalyst@lists.rawmode.org
    Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
    Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
    Dev site: http://dev.catalyst.perl.org/



    ---------------------------------
    Ready for the edge of your seat? Check out tonight's top picks on Yahoo! TV.
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20070809/7d0dce70/attachment.htm
  • Matt S Trout at Aug 8, 2007 at 5:42 pm

    On Wed, Aug 08, 2007 at 06:14:54AM -0700, Will Smith wrote:
    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:
    Write a startup.pl that does 'use lib' and PerlModule directives
    appropriately.

    Also, if you're attempting to build a live deployment platform consider
    getting a professional in to set it up, there's quite a few of us about and
    it's better to spend a few hundred dollars on a consultant than have your
    production platform go down because management expected you to be a sysadmin
    as well as a developer.

    --
    Matt S Trout Need help with your Catalyst or DBIx::Class project?
    Technical Director Want a managed development or deployment platform?
    Shadowcat Systems Ltd. Contact mst (at) shadowcatsystems.co.uk for a quote
    http://chainsawblues.vox.com/ http://www.shadowcat.co.uk/

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedAug 8, '07 at 2:14p
activeAug 9, '07 at 2:46p
posts6
users5
websitecatalystframework.org
irc#catalyst

People

Translate

site design / logo © 2022 Grokbase