Virtualising Magnolia CMS

In a sharp left-turn for the danwalmsley.com ouvre, what follows is instructions for virtualising Magnolia CMS. Magnolia is an open-source Content Management system available in both community and enterprise versions, and is elegant and easy-to-use.

If you want to deploy Magnolia for multiple clients across multiple virtual domains hosted through a single instance of Apache HTTPD and a single instance of Apache Tomcat, read on.

Virtualising Magnolia

Virtualises magnolia for an apache virtual host under / for root and /admin for admin stuff

What you get:

  • myclient.com: magnolia public content (i.e. everything normally under /magnoliaPublic)
  • myclient.com/admin: magnolia authoring interface (i.e. everything normally under /magnoliaAuthor)

Variables:
$CLIENT = client name, e.g. myclient
$CLIENT_HOSTNAME = client host name to be proxied, e.g. myclient.com
$CLIENT_PORT = selected port on which Tomcat should host the site, e.g. 8082.
$TOMCAT_HOME = installation directory of TOMCAT

Tomcat Config

mkdir $TOMCAT_HOME/webapps_$CLIENT

unzip magnoliaPublic.war to webapps_$CLIENT/ROOT
unzip magnoliaAuthor.war to webapps_$CLIENT/admin

cd $TOMCAT_HOME/conf/Catalina

mkdir $CLIENT_HOSTNAME
(e.g. mkdir myclient.com)

edit $TOMCAT_HOME/conf/server.xml to include the following elements:

<!--<![CDATA[




      
        
        

      
]]>-->

Configure Apache

Enable mod_proxy

Create a config, $CLIENT.conf:

< ![CDATA[

    ServerName $CLIENT_HOSTNAME

    ProxyRequests Off
    
        Order deny,allow
        Allow from all
    

    ProxyPass / http://localhost:$CLIENT_PORT/
    ProxyPassReverse / http://localhost:$CLIENT_PORT/

    
        Order allow,deny
        Allow from all
    

]]>

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.