Database Reference
In-Depth Information
• Sometimes you're running on a server in a mixed environment. Besides the eXist
application there can be other applications active, based on PHP, CGI, Perl, and
more. The easiest way to handle this is to use a workhorse like Apache and proxy
eXist behind Apache.
• Apache is more flexible in configuration than Jetty + eXist and contains more
functionality as a web server.
• System managers are probably more used to running Apache as a frontend than
Jetty. They have things like tools and scripts hanging around and know the com‐
mands by heart. Keep them happy!
• Apache is used more than Jetty, so there are lots of third-party tools for things
like analyzing web traffic.
There is more than one way to handle this, but here is a recipe for proxying an eXist
application behind Apache:
1. Leave the Jetty settings at the defaults (i.e., TCP port 8080 and a URL prefix
of /exist ).
2. Adapt the controller-config.xml file so that the URL to your application points to
the right collection (or directory). For example:
<root server-name= "www.myapp.com" pattern= ".*"
path= "xmldb:exist:///db/myapp/" />
3. Enable the mod_proxy module in Apache.
4. Add the configuration shown in Example 9-3 to Apache (this is a minimal exam‐
ple; you'll probably want to add logging and other functionality).
Example 9-3. Apache configuration for proxying eXist
<VirtualHost *:80>
ServerAdmin your-admin-email@your-domain.com
# The URLs for this application:
ServerName www.myapp.nl
ServerAlias myapp.com
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://www.myapp.nl:8080/exist/
ProxyPassReverse / http://www.myapp.nl:8080/exist/
Search WWH ::




Custom Search