How to use NGINX to proxy requests for Confluence
This page describes a possible way to use NGINX to proxy requests for Confluence running in a standard Tomcat container. You can find additional documentation that explains how to use Apache mod_proxy for the very same purpose. For Confluence 6.0 or later you'll need a version of NGINX that supports WebSockets (1.3 or later).
Set context path
Set your Confluence application path (the part after hostname and port) in Tomcat. Edit <CONFLUENCE-INSTALL>/
conf/server.xml, locate the "Context" definition:
and change it to:
Restart Confluence, and check you can access it at
Next, set the URL for redirection. In the same <CONFLUENCE-INSTALL>/
conf/server.xml file, locate this code segment:
And append the last line:
You will need to specify a listening server in NGINX, as in the example below. Add the following to your NGINX configuration:
For Confluence 6.0 and later:
For Confluence 5.10 and earlier:
If the NGINX proxy is not listening to the same IP that the hostname resolves, please use the IP address that the proxy is listening to instead of the application hostname.
Set base URL
For normal operation of Confluence you will also need to set the base URL accordingly. In this example the base URL would be set to .
- For the settings above to take effect you need to restart both Confluence (including Synchrony) and NGINX.
- If you encounter problems with input validation, it might be caused by the gzip compression enabled in reverse proxying. Such an issue is described in the Create Space button inactive in Add Space dialog article.
Was this helpful?
Thanks for your feedback!