Page tree
Skip to end of metadata
Go to start of metadata
Your Rating: Results: 1 Star2 Star3 Star4 Star5 Star 149 rates

To run several sites with one Magnolia instance (author and public) you can use Apache with mod_jk (however, with Apache 2, the mod_proxy plug-in provides a more generic interface, suitable for Tomcat as well as any other application server). Here is what you have to do:

1. Give every site a separate content tree. I.e., create a top-level item in the "Websites" panel for each site you wish to create.

- /site1.html
- /site2.html

2. Configure Apache with mod_jk, setup mod_jk (/etc/httpd/httpd.conf):

# Load mod_jk
LoadModule jk_module /usr/lib/apache/
# Configure mod_jk
JkWorkersFile /etc/httpd/conf/
JkLogFile /var/log/httpd/mod_jk.log

3. Setup for Magnolia (/etc/httpd/conf/

# Setting Java Home


4. Define virtual hosts for all of you sites (/etc/httpd/httpd.conf):

NameVirtualHost *

# Site1
<VirtualHost *>
RewriteEngine on
RewriteRule ^/$ /site1.html [R]
JkMount /* public

# Site2
<VirtualHost *>
RewriteEngine on
RewriteRule ^/$ /site2.html [R]
JkMount /* public

If needed you can use ProxyPass/Reverse directives instead of RewriteRule.

5. Define a virtual host for the authoring instance (/etc/httpd/httpd.conf):

<VirtualHost *>
DocumentRoot /srv/www/htdocs/site1
JkMount /* author

6. Setup roles for each site like you find in Setup editor role for a site

7. Test it

Basically, this should be enough, but if you are making this on a Linux OS and SELinux is running you may experience permission problems during the redirect. In this case you'll find the following messages in the error.log of the Apache:

Permission Denied: Proxy: HTTP: Attempt to connect to failed

In this case, try to enabled script access in SELinux (Described for fedoracore):

Desktop -> System Setting -> Security level -> SElinux -> HTTPD Service -->
Check "Allow HTTPD scripts to connect to the network"

Once this is set up, you may find Getting site data helpful.

In its previous incarnation on JspWiki, this page was last edited on Feb 9, 2007 10:59:43 AM by Magnolia
Other known authors include :

  • RalfHirning