We want to run multiple Wiki webs for multiple projects, using Apache2, Tomcat 5.5, JSPWiki 2.2.28ff. Initially we had some serious problems, this is the report of the successful setup to help others.

The common JSPWiki installation folder for all the wiki webs we want to run is /Wiki/JSPWiki relative to webroot, mapping to real folder "D:\DiversityCampus\Wiki\JSPWiki".

Tomcat 5.5 Settings:#

For each wiki web we define a context in C:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\server.xml such as:

        override="false" />
    <ResourceLink name="jdbc/SQLServer_CPDS" 
        global="jdbc/SQLServer_CPDS" />         
    <ResourceLink name="jdbc/SQLServer_PerUserPoolDataSource" 
        global="jdbc/SQLServer_PerUserPoolDataSource" />            

Apache 2 Settings:#

(in C:\Program Files\Apache Group\Apache2\conf\httpd.conf)

Alias settings#

# -------------------- Alias to the JSP Wikis:
# note: Alias both end with slash, Directory: no slash at end!

Alias /WorkbenchDevelopmentWiki/    "D:/DiversityCampus/Wiki/JSPWiki/"
Alias /workbenchdevelopmentwiki/    "D:/DiversityCampus/Wiki/JSPWiki/"

Alias /SandboxWiki/ "D:/DiversityCampus/Wiki/JSPWiki/"
Alias /sandboxwiki/ "D:/DiversityCampus/Wiki/JSPWiki/"

Alias /TemplateWiki/ "D:/DiversityCampus/Wiki/JSPWiki/"

<Directory "D:/DiversityCampus/Wiki/JSPWiki">
    AllowOverride None 
    Options FollowSymlinks
    Order allow,deny
    Allow from all

Then the normal page URL is:
http://<serverdomainname>/SandboxWiki/Wiki/Main (using short url constructor)
(/SandboxWiki is virtual, no real folder exists).

JkMount settings (connecting Apache with Tomcat):#

JkMount  /*/attach/* ajp13w
JkMount  /*/Wiki/* ajp13w
# A * in the middle of the JkMount  path is indeed supported, it is not necessary to write
#   JkMount  /<Wikiname>/attach/* ajp13w
# for each wiki in the multi wiki setup.

# Also added, according to http://www.jspwiki.org/wiki/DeploymentOptimizations, not sure whether necessary.
JkMount  /WorkbenchDevelopmentWiki ajp13w
JkMount  /WorkbenchDevelopmentWiki/ ajp13w
JkMount  /SandboxWiki ajp13w
JkMount  /SandboxWiki/ ajp13w


Catch 1:#

Apache Aliases are case-sensitive. That is intuitive to programmers, but not to users. For example one of our Wikis was called "LIAS", which is an abbreviation and no biologist (we are biologists) sees a difference between "LIAS", "Lias", and "lias". Just formatting to us... So the above should better read:

   Alias /Wiki/Lias/    "D:/DiversityCampus/Wiki/JSPWiki/"
   Alias /Wiki/LIAS/    "D:/DiversityCampus/Wiki/JSPWiki/"
   Alias /Wiki/lias/    "D:/DiversityCampus/Wiki/JSPWiki/"

Catch 2:#

In the JSPWiki property file, jspwiki.baseURL must be set to the virtual (wiki-specific) program path, not to the physical installation path where the css/image/template files actually reside.

In our example this is e.g.

and not

In our case we got confused here, because if the Aliasing (for us Apache) does not work correctly, it is deceptive to set this to the actual path. In that case the pages still work (using relative urls), and the resources such as images or CSS are obtained from the physical installation path - almost everything works, except that servlets such as attaching files or using short url constructors fail.

Many thanks to JanneJalkanen for his help!

Using ShortViewURLConstructor example:#

jspwiki.urlConstructor = ShortViewURLConstructor
# jspwiki.shortURLConstructor.prefix = http://www.DiversityCampus.net/Sandbox/Wiki/

After fixing the problems with Tomcat/Apache settings, both attachments and ShortViewURLConstructor work. Lesson: if ShortViewURLConstructor fail, check uploading. If both fails, the settings are wrong.

In our case (starting with JSPWiki 2.2.28), in JSPWiki/WEB-INF/web.xml we had to add the second of the servlet mappings shown:


I assume later versions will already contain this. Note that we chose Uppercase "Wiki" rather than "wiki". If your folder names are all-lowercase, "wiki" would be preferable, but we use First-letter-uppercase folder names. URL are easier to memorize and type, if case usage is consistent.

Other small thing we can verify: We use JDBCProvider as page provider successfully with SQL server 2000, and combine it with the BasicAttachmentProvider for attachments. With the new updated versions of the JDBC provider as of September 2005, this combination works well. We did not test JDBCProvider for attachments.

Gregor Hagedorn, Andreas Kohlbecker, 20.9.2005

Back to MultipleWikis

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-23) was last changed on 03-Mar-2011 11:10 by Janne Jalkanen