Production use - Proxying eXist-db behind a Web Server
From a security perspective it is recognised best practice to proxy Web Application Servers behind dedicated Web Servers. eXist-db is no exception. This article will provide you with some examples on how to do this.
Interesting side-effects of proxying eXist-db behind a Web Server:
- Unified web namespace
You can map eXist-db, or an application build on eXist-db, into an existing web namespace. If your website is -
http://www.mywebsite.com, then your eXist-db application could be mapped into
http://www.mywebsite.com/myapplication/. However, if you are tempted to shorten the URL of WebDAV resources with such a mapping, you will not succeed, due to the specifications of WebDAV that are not designed to handle such cases.
- Virtual Hosting
Providing your Web Server supports Virtual Hosting, you should be able to proxy many URLs from different domains onto different eXist-db REST URLs, which may belong to one or more eXist-db instances. This allows a single eXist-db instance to perform virtual hosting.
Examples are provided for:
In this example we look at how to proxy a web domain name onto an eXist-db Collection. We make the following assumptions:
http://www.mywebsite.comis our website domain name address
eXist-db is running in standalone mode (i.e.
http://localhost:8088/) on the same host as the Web Server (i.e.
/db/apps/mywebsite.comis the eXist-db collection we want to proxy
Web Server access logging will be written to
This needs to be added to the
http section of the
This needs to be added to your