How to set up JSPWiki as Tomcat's Root context with an Apache frontend
My solution goes like this, probably there is an easier way.
- Apache as frontend listening on port 80
- JSPWiki as root context
- ShortURLConstructor
- Container managed security
JSPWiki as root context
- delete Tomcat's ROOT context
- put a Context element below a Host element into Tomcat's conf/server.xml <Context path="" docBase="/my/path/to/JSPWiki"/>
ShortURLConstructor
ShortURLConstructor is used to get consistent /wiki prefixes for all pages and actions
Apache as frontend listening on port 80
This is the ugly part. You have to describe to Apache which pages should go to Tomcat. As JSPWiki is ROOT context, there is no common prefix like /JSPWiki neither you can use .jsp as I like the ShortURLConstructor syntax. So you have to configure all possible prefixes to go to Tomcat:
JkMount /wiki* MyJKAlias JkMount /templates* MyJKAlias JkMount /scripts* MyJKAlias JkMount /images* MyJKAlias JkMount /attach* MyJKAlias JkMount /Login.jsp* MyJKAlias JkMount /Logout.jsp* MyJKAlias JkMount /Search.jsp* MyJKAlias JkMount /Comment.jsp* MyJKAlias JkMount /Rename.jsp* MyJKAlias JkMount /Upload.jsp* MyJKAlias JkMount /UserPreferences.jsp* MyJKAlias JkMount /j_security_check* MyJKAlias
Probably there are more which I might have overlooked.
This could be easier if at least templates, scripts and images were below a common /static and the .jsp could be replaced by servlets. j_security_check is defined by the Servlet spec. Chances are that /templates clashes with other content Apache serves.
Maybe I'll open a Jira Bug.
Cheers, Juergen