Dashboard > Community Wiki > ... > Deployment > Configure multiple instances
Configure multiple instances Log In View a printable version of the current page.

Added by GrĂ©gory Joseph , last edited by Boris Kraft on Jun 23, 2008  (view change)
Labels: 

How to configure Magnolia to run as two webapps under one tomcat service.

In Magnolia 2.0, you needed to tie Magnolia to the root context of the server. Now, you can run several Magnolias as normal webapps, and set them up like this, for example:

magnolia ---> publishes to ---> magnoliaPublic

First you need to set up the normal magnolia instance.

Install magnoliaPublic

For deploying magnoliaPublic, you need to
unjar it before you deploy it to tomcat, like this

  • cd ~
  • wget http://magnolia.sourceforge.net/nightly/magnolia.war
  • mkdir magnoliaPublic
  • cp magnolia.war magnoliaPublic/
  • cd magnoliaPublic
  • jar xvf magnolia.war
  • rm magnolia.war
  • fix web.xml and log4j.xml
    • Change magnolia.root in WEB-INF/web.xml to magnoliaPublic.root, and application name to magnoliaPublic
    • Change all instances of magnolia.root in config/log4j.xml to magnoliaPublic.root
  • cd ~
  • mv magnoliaPublic $CATALINA_HOME/webapps

Then restart tomcat (bootstrapping a new Magnolia instance takes a few minutes). Moving a folder like magnoliaPublic into
$CATALINA_HOME/webapps is essentially the same as "dropping a war file"
into the same dir, only the app is not deployed until you restart tomcat.

Set up magnoliaPublic

  1. Make sure you've installed it correctly.
  2. Log in on magnoliaPublic (superadmin/superadmin)
  3. Change Config/server/admin to false
  4. Remove all Website items
  5. Restart magnoliaPublic context (you can do this from the tomcat manager)
  6. Log into magnolia (not public)
  7. Change subscriber to something like localhost:8080/magnoliaPublic
  8. Set active to true
  9. Restart magnolia context

Not sure this will work on the first try. You can also change a flag in
web.xml to skip the bootstrapping process, then do some manual moving of
repositories from magnolia to magnoliaPublic, but I haven't messed around
with that too much. The above procedure has worked somewhat before anyway.

How to configure Magnolia to run as separate service (listening on separate port) under one tomcat instance

WARNING: This procedure is required only for old Magnolia 2.0.

1. server.xml - define services for author and public

(refer to attached file server.xml)

In its previous incarnation on JspWiki, this page was last edited on Feb 9, 2007 10:11:21 AM by BorisKraft
Other known authors include :

  • Scharles
  • RalfHirning
  • FerrisNicolaisen
Powered by a free Atlassian Confluence Open Source Project License granted to Magnolia International. Evaluate Confluence today.
Powered by Atlassian Confluence 2.7, the Enterprise Wiki. Bug/feature request - Atlassian news - Contact administrators