comparison server-setup.html @ 1701:9538e27b5c2f

Creating site for 2.6-SNAPSHOT
author Robert Casties <casties@mpiwg-berlin.mpg.de>
date Tue, 18 Dec 2018 10:53:03 +0000
parents 79c837179ffb
children
comparison
equal deleted inserted replaced
1700:79c837179ffb 1701:9538e27b5c2f
227 location / { 227 location / {
228 proxy_pass http://localhost:8080; 228 proxy_pass http://localhost:8080;
229 } 229 }
230 } 230 }
231 </pre></div></div> 231 </pre></div></div>
232 <div class="section"> 232 <p>Please check the <a href="nginx.org/en/docs/">nginx documentation</a>.</p></div>
233 <h3><a name="Resources"></a>Resources</h3>
234
235 <ul>
236
237 <li>the <a href="nginx.org/en/docs/">nginx documentation</a></li>
238 </ul></div></div>
239 <div class="section"> 233 <div class="section">
240 <h2><a name="Apache_as_proxy_and_load-balancer"></a>Apache as proxy and load-balancer</h2> 234 <h2><a name="Apache_as_proxy_and_load-balancer"></a>Apache as proxy and load-balancer</h2>
241 <p>This is an example configuration for <a class="externalLink" href="https://httpd.apache.org/">Apache</a> as a proxy and load balancer for two instances of digilib (one running on localhost, port 8080 and another on otherserver, port 8080), using SSL and http/2:</p> 235 <p>This is an example configuration for <a class="externalLink" href="https://httpd.apache.org/">Apache</a> as a proxy and load balancer for two instances of digilib (one running on localhost, port 8080 and another on otherserver, port 8080), using SSL and http/2:</p>
242 236
243 <div class="source"> 237 <div class="source">
292 <p>When you are using <a class="externalLink" href="https://www.eclipse.org/jetty/">Jetty</a> as servlet container behind an Apache or nginx proxy then you should make sure that Jetty processes the <tt>X-Forwarded-*</tt> headers from the proxy server to derive the correct request URL for the servlets.</p> 286 <p>When you are using <a class="externalLink" href="https://www.eclipse.org/jetty/">Jetty</a> as servlet container behind an Apache or nginx proxy then you should make sure that Jetty processes the <tt>X-Forwarded-*</tt> headers from the proxy server to derive the correct request URL for the servlets.</p>
293 <p>Please see <a class="externalLink" href="http://www.eclipse.org/jetty/documentation/9.4.x/configuring-connectors.html#_proxy_load_balancer_connection_configuration">this information for Jetty 9.4</a> or <a class="externalLink" href="https://wiki.eclipse.org/Jetty/Tutorial/Apache#Configuring_mod_proxy_http">this information for Jetty 8 and earlier versions</a>.</p></div> 287 <p>Please see <a class="externalLink" href="http://www.eclipse.org/jetty/documentation/9.4.x/configuring-connectors.html#_proxy_load_balancer_connection_configuration">this information for Jetty 9.4</a> or <a class="externalLink" href="https://wiki.eclipse.org/Jetty/Tutorial/Apache#Configuring_mod_proxy_http">this information for Jetty 8 and earlier versions</a>.</p></div>
294 <div class="section"> 288 <div class="section">
295 <h2><a name="Tomcat_behind_a_proxy"></a>Tomcat behind a proxy</h2> 289 <h2><a name="Tomcat_behind_a_proxy"></a>Tomcat behind a proxy</h2>
296 <p>When you are using <a class="externalLink" href="https://tomcat.apache.org">Tomcat</a> as a servlet container behind an Apache or nginx proxy then you should make sure that Tomcat processes the <tt>X-Forwarded-*</tt> headers from the proxy server to derive the correct request URL for the servlets.</p> 290 <p>When you are using <a class="externalLink" href="https://tomcat.apache.org">Tomcat</a> as a servlet container behind an Apache or nginx proxy then you should make sure that Tomcat processes the <tt>X-Forwarded-*</tt> headers from the proxy server to derive the correct request URL for the servlets.</p>
297 <p>Please see the Tomcat documentation about the <a class="externalLink" href="https://tomcat.apache.org/tomcat-9.0-doc/config/valve.html#Remote_IP_Valve">Remote IP Valve</a>. You basically need to add the following XML tag with your proxy&#x2019;s IP numbers to the <tt>Host</tt> tag of your <tt>server.xml</tt> file: <tt> 291 <p>Please see the Tomcat documentation about the <a class="externalLink" href="https://tomcat.apache.org/tomcat-9.0-doc/config/valve.html#Remote_IP_Valve">Remote IP Valve</a>. You basically need to add the following XML tag with your proxy&#x2019;s IP numbers to the <tt>Host</tt> tag of your <tt>server.xml</tt> file and make sure <tt>ProxyPreserveHost</tt> is set to <tt>on</tt>:</p>
298 &lt;Valve className=&quot;org.apache.catalina.valves.RemoteIpValve&quot; 292
293 <div class="source">
294 <div class="source">
295 <pre> &lt;Valve className=&quot;org.apache.catalina.valves.RemoteIpValve&quot;
299 internalProxies=&quot;127\.0\.0\.1|123\.45\.67\.89&quot; 296 internalProxies=&quot;127\.0\.0\.1|123\.45\.67\.89&quot;
300 remoteIpHeader=&quot;x-forwarded-for&quot; 297 remoteIpHeader=&quot;x-forwarded-for&quot;
301 proxiesHeader=&quot;x-forwarded-by&quot; 298 proxiesHeader=&quot;x-forwarded-by&quot;
302 protocolHeader=&quot;x-forwarded-proto&quot; /&gt; 299 protocolHeader=&quot;x-forwarded-proto&quot; /&gt;
303 </tt> and make sure <tt>ProxyPreserveHost</tt> is set to <tt>on</tt>.</p></div> 300 </pre></div></div></div>
304 </div> 301 </div>
305 </div> 302 </div>
306 </div> 303 </div>
307 304
308 <hr/> 305 <hr/>