ApacheConfigurations - from r970 to r971

For various reasons it is often desirable to deploy reviki on a servlet container that is itself behind the apache webserver. This page is will document known working configurations and track effort to make this process easier.

**Note** in the examples below various demo.localhost style hosts are used in place of your Apache hostname. The host we're proxying to, running tomcat, is always referred to as localhost.

== Usecase 1

Tomcat running reviki in default setup, with /reviki context. Apache virtual host proxying to /reviki from some other URL giving the following URL public structure:

{{{
http://demo.localhost/here/$wikiName/$pageName
}}}

==== Example virtual server configuration

{{{
<VirtualHost *>
ServerName demo.localhost

<Proxy *>
Order allow,deny
Allow from all
</Proxy>

ProxyRequests Off
ProxyVia On

RequestHeader set X-Reviki-Base-Location http://demo.localhost/here/
ProxyPass /here/ ajp://localhost:8009/reviki/
ProxyPassReverse /here/ ajp://localhost:8009/reviki/
ProxyPassReverseCookiePath /reviki /here
</VirtualHost>
}}}

You'll always have to do more than just proxy as reviki needs to know how to generate full URLs to pages (e.g. for atom feed). We pass the base URL as a custom header that reviki understands.

The configuration above is supported from revision:967.

Note you need to enable several apache modules. On Debian based Linux distros this can be done as follows:

{{{
a2enmod proxy
a2enmod proxy-ajp
a2enmod headers
}}}

== Usecase 2

Present only a single wiki publicly, e.g. /reviki/public/FrontPage should be exposed at

{{{
http://demo2.localhost/FrontPage
}}}

//To be continued...//