Mercurial > hg > digilib
diff server-setup.html @ 1682:8a9c66abb57c
Creating site for 2.5-SNAPSHOT
author | Robert Casties <casties@mpiwg-berlin.mpg.de> |
---|---|
date | Wed, 14 Mar 2018 18:57:23 +0000 |
parents | 1beeb9319d78 |
children | 79c837179ffb |
line wrap: on
line diff
--- a/server-setup.html Tue Nov 21 19:34:58 2017 +0000 +++ b/server-setup.html Wed Mar 14 18:57:23 2018 +0000 @@ -1,15 +1,15 @@ <!DOCTYPE html> <!-- - | Generated by Apache Maven Doxia at 2017-11-21 + | Generated by Apache Maven Doxia at 2018-03-14 | Rendered using Apache Maven Fluido Skin 1.3.0 --> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> - <meta name="Date-Revision-yyyymmdd" content="20171121" /> + <meta name="Date-Revision-yyyymmdd" content="20180314" /> <meta http-equiv="Content-Language" content="en" /> - <title>digilib - The Digital Image Library – Server setups for digilib</title> + <title>digilib - The Digital Image Library – Server setup for digilib</title> <link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" /> <link rel="stylesheet" href="./css/site.css" /> <link rel="stylesheet" href="./css/print.css" media="print" /> @@ -41,7 +41,7 @@ <ul class="breadcrumb"> - <li id="publishDate">Last Published: 2017-11-21</li> + <li id="publishDate">Last Published: 2018-03-14</li> <li class="divider">|</li> <li id="projectVersion">Version: 2.5-SNAPSHOT</li> @@ -102,12 +102,10 @@ Installing digilib</a> </li> - <li> + <li class="active"> - <a href="server-setups.html" title="Server setups"> - <i class="none"></i> - Server setups</a> - </li> + <a href="#"><i class="none"></i>Server setup</a> + </li> <li class="nav-header">Configuration</li> <li> @@ -200,9 +198,9 @@ <div id="bodyColumn" class="span9" > - <h1>Server setups for digilib</h1> + <h1>Server setup for digilib</h1> <p>There are a variety of ways to deploy digilib on different server configurations for production sites. </p> -<p>Here are some examples.</p> +<p>Here are some examples and tips.</p> <div class="section"> <h2><a name="nginx_as_proxy"></a>nginx as proxy</h2> <p>This is an example configuration for <tt>nginx</tt> as a proxy for a single instance of digilib (listening on port <tt>8080</tt>) that handles transport encryption and restricts access to sensitive data to the gateway of a local network (<tt>1.2.3.4</tt>).</p> @@ -230,14 +228,68 @@ proxy_pass http://localhost:8080; } } -</pre></div></div></div> +</pre></div></div> <div class="section"> -<h2><a name="Resources"></a>Resources</h2> +<h3><a name="Resources"></a>Resources</h3> <ul> <li>the <a href="nginx.org/en/docs/">nginx documentation</a></li> -</ul></div> +</ul></div></div> +<div class="section"> +<h2><a name="Apache_as_proxy_and_load-balancer"></a>Apache as proxy and load-balancer</h2> +<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> + +<div class="source"> +<div class="source"> +<pre><VirtualHost *:443> + # HTTP/2 protocol (Apache 2.4.29 and later) + Protocols h2 http/1.1 + ServerName digilib.example.com + SSLCertificateFile /etc/ssl/private/digilib-cert.pem + SSLCertificateKeyFile /etc/ssl/private/digilib-key.pem + SSLEngine on + + DocumentRoot /var/www + <Directory /> + Options FollowSymLinks + AllowOverride None + </Directory> + <Directory /var/www/> + Options Indexes FollowSymLinks MultiViews + AllowOverride None + Order allow,deny + allow from all + </Directory> + + ErrorLog ${APACHE_LOG_DIR}/digilib-ssl-error.log + LogLevel warn + CustomLog ${APACHE_LOG_DIR}/digilib-ssl-access.log combined + + # do not forward-proxy! + ProxyRequests off + # set proxy proto header + RequestHeader set X-Forwarded-Proto "https" + # digilib instances + <Proxy balancer://digilibs> + BalancerMember http://127.0.0.1:8080 + BalancerMember http://otherserver.example.com:8080 + </Proxy> + # balance by busy-ness + ProxyPass /digitallibrary balancer://digilibs/digitallibrary lbmethod=bybusyness + ProxyPassReverse /digitallibrary balancer://digilibs/digitallibrary + + # balancer-manager frontend (be careful!) + <Location /balancer-manager> + SetHandler balancer-manager + Require host localhost + </Location> +</VirtualHost> +</pre></div></div></div> +<div class="section"> +<h2><a name="Jetty_behind_a_proxy"></a>Jetty behind a proxy</h2> +<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> +<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> </div> </div> </div> @@ -246,7 +298,7 @@ <footer> <div class="container-fluid"> - <div class="row span12">Copyright © 2001-2017 + <div class="row span12">Copyright © 2001-2018 <a href="https://robcast.github.io/digilib/">digilib Community</a>. All Rights Reserved.