1658
|
1 # Server setups for digilib
|
|
2
|
|
3 There are a variety of ways to deploy digilib on different server configurations for production sites.
|
|
4
|
|
5 Here are some examples.
|
|
6
|
|
7 ## nginx as proxy
|
|
8
|
|
9 This is an example configuration for `nginx` as a proxy for a single instance
|
|
10 of digilib (listening on port `8080`) that handles transport encryption and
|
|
11 restricts access to sensitive data to the gateway of a local network
|
|
12 (`1.2.3.4`).
|
|
13
|
|
14 ```nginx
|
|
15 server {
|
|
16 listen 443 ssl http2;
|
|
17 listen [::]:443 ssl http2;
|
|
18 server_name digilib.example.org;
|
|
19
|
|
20 # this certificate chain shall *not* include the root certificate:
|
|
21 ssl_certificate /etc/ssl/certs/digilib.example.org.pem;
|
|
22 ssl_certificate_key /etc/ssl/private/digilib.example.org.key;
|
|
23
|
|
24 include /etc/nginx/proxy_params;
|
|
25
|
|
26 location ~* .*/(dlConfig|dlRequest).jsp$ {
|
|
27 allow 1.2.3.4;
|
|
28 deny all;
|
|
29 proxy_pass http://localhost:8080;
|
|
30 }
|
|
31
|
|
32 location / {
|
|
33 proxy_pass http://localhost:8080;
|
|
34 }
|
|
35 }
|
|
36 ```
|
|
37
|
|
38 ## Resources
|
|
39
|
|
40 - the [nginx documentation](nginx.org/en/docs/)
|