# HG changeset patch # User Robert Casties # Date 1545129341 -3600 # Node ID 7e4396e467de747dfd69be1e90ffbbc44a4dea27 # Parent fc8e4f893db12630c131169a89fae4fd3b054f3c Add documentation about running Tomcat behind a proxy. diff -r fc8e4f893db1 -r 7e4396e467de doc/src/site/markdown/server-setup.md --- a/doc/src/site/markdown/server-setup.md Sun Dec 16 18:49:16 2018 +0100 +++ b/doc/src/site/markdown/server-setup.md Tue Dec 18 11:35:41 2018 +0100 @@ -71,7 +71,8 @@ # do not forward-proxy! ProxyRequests off - # set proxy proto header + # set proxy headers + ProxyPreserveHost On RequestHeader set X-Forwarded-Proto "https" # digilib instances @@ -96,4 +97,22 @@ then you should make sure that Jetty processes the `X-Forwarded-*` headers from the proxy server to derive the correct request URL for the servlets. -Please see [this information for Jetty 9.4](http://www.eclipse.org/jetty/documentation/9.4.x/configuring-connectors.html#_proxy_load_balancer_connection_configuration) or [this information for Jetty 8 and earlier versions](https://wiki.eclipse.org/Jetty/Tutorial/Apache#Configuring_mod_proxy_http). +Please see [this information for Jetty 9.4](http://www.eclipse.org/jetty/documentation/9.4.x/configuring-connectors.html#_proxy_load_balancer_connection_configuration) +or [this information for Jetty 8 and earlier versions](https://wiki.eclipse.org/Jetty/Tutorial/Apache#Configuring_mod_proxy_http). + +## Tomcat behind a proxy + +When you are using [Tomcat](https://tomcat.apache.org) as a servlet container behind an Apache or nginx proxy then +you should make sure that Tomcat processes the `X-Forwarded-*` headers from the proxy server to derive the +correct request URL for the servlets. + +Please see the Tomcat documentation about the [Remote IP Valve](https://tomcat.apache.org/tomcat-9.0-doc/config/valve.html#Remote_IP_Valve). +You basically need to add the following XML tag with your proxy's IP numbers to the `Host` tag of your `server.xml` file: +``` + +``` +and make sure `ProxyPreserveHost` is set to `on`.