annotate doc/src/site/markdown/server-setup.md @ 1658:28df291d4e26

Updated documentation. Updated build and install instructions to be simpler and hopefully more clear. Updated @funkyfuture's refactored configuration docs (still lots TODO). Added @funkyfuture's server-setup docu to menu. Renamed non-minified digilib-dbg.html to digilib-dev.html
author Robert Casties <r0bcas7@gmail.com>
date Mon, 20 Nov 2017 21:08:35 +0100
parents
children 6d5e04a54848
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1658
28df291d4e26 Updated documentation.
Robert Casties <r0bcas7@gmail.com>
parents:
diff changeset
1 # Server setups for digilib
28df291d4e26 Updated documentation.
Robert Casties <r0bcas7@gmail.com>
parents:
diff changeset
2
28df291d4e26 Updated documentation.
Robert Casties <r0bcas7@gmail.com>
parents:
diff changeset
3 There are a variety of ways to deploy digilib on different server configurations for production sites.
28df291d4e26 Updated documentation.
Robert Casties <r0bcas7@gmail.com>
parents:
diff changeset
4
28df291d4e26 Updated documentation.
Robert Casties <r0bcas7@gmail.com>
parents:
diff changeset
5 Here are some examples.
28df291d4e26 Updated documentation.
Robert Casties <r0bcas7@gmail.com>
parents:
diff changeset
6
28df291d4e26 Updated documentation.
Robert Casties <r0bcas7@gmail.com>
parents:
diff changeset
7 ## nginx as proxy
28df291d4e26 Updated documentation.
Robert Casties <r0bcas7@gmail.com>
parents:
diff changeset
8
28df291d4e26 Updated documentation.
Robert Casties <r0bcas7@gmail.com>
parents:
diff changeset
9 This is an example configuration for `nginx` as a proxy for a single instance
28df291d4e26 Updated documentation.
Robert Casties <r0bcas7@gmail.com>
parents:
diff changeset
10 of digilib (listening on port `8080`) that handles transport encryption and
28df291d4e26 Updated documentation.
Robert Casties <r0bcas7@gmail.com>
parents:
diff changeset
11 restricts access to sensitive data to the gateway of a local network
28df291d4e26 Updated documentation.
Robert Casties <r0bcas7@gmail.com>
parents:
diff changeset
12 (`1.2.3.4`).
28df291d4e26 Updated documentation.
Robert Casties <r0bcas7@gmail.com>
parents:
diff changeset
13
28df291d4e26 Updated documentation.
Robert Casties <r0bcas7@gmail.com>
parents:
diff changeset
14 ```nginx
28df291d4e26 Updated documentation.
Robert Casties <r0bcas7@gmail.com>
parents:
diff changeset
15 server {
28df291d4e26 Updated documentation.
Robert Casties <r0bcas7@gmail.com>
parents:
diff changeset
16 listen 443 ssl http2;
28df291d4e26 Updated documentation.
Robert Casties <r0bcas7@gmail.com>
parents:
diff changeset
17 listen [::]:443 ssl http2;
28df291d4e26 Updated documentation.
Robert Casties <r0bcas7@gmail.com>
parents:
diff changeset
18 server_name digilib.example.org;
28df291d4e26 Updated documentation.
Robert Casties <r0bcas7@gmail.com>
parents:
diff changeset
19
28df291d4e26 Updated documentation.
Robert Casties <r0bcas7@gmail.com>
parents:
diff changeset
20 # this certificate chain shall *not* include the root certificate:
28df291d4e26 Updated documentation.
Robert Casties <r0bcas7@gmail.com>
parents:
diff changeset
21 ssl_certificate /etc/ssl/certs/digilib.example.org.pem;
28df291d4e26 Updated documentation.
Robert Casties <r0bcas7@gmail.com>
parents:
diff changeset
22 ssl_certificate_key /etc/ssl/private/digilib.example.org.key;
28df291d4e26 Updated documentation.
Robert Casties <r0bcas7@gmail.com>
parents:
diff changeset
23
28df291d4e26 Updated documentation.
Robert Casties <r0bcas7@gmail.com>
parents:
diff changeset
24 include /etc/nginx/proxy_params;
28df291d4e26 Updated documentation.
Robert Casties <r0bcas7@gmail.com>
parents:
diff changeset
25
28df291d4e26 Updated documentation.
Robert Casties <r0bcas7@gmail.com>
parents:
diff changeset
26 location ~* .*/(dlConfig|dlRequest).jsp$ {
28df291d4e26 Updated documentation.
Robert Casties <r0bcas7@gmail.com>
parents:
diff changeset
27 allow 1.2.3.4;
28df291d4e26 Updated documentation.
Robert Casties <r0bcas7@gmail.com>
parents:
diff changeset
28 deny all;
28df291d4e26 Updated documentation.
Robert Casties <r0bcas7@gmail.com>
parents:
diff changeset
29 proxy_pass http://localhost:8080;
28df291d4e26 Updated documentation.
Robert Casties <r0bcas7@gmail.com>
parents:
diff changeset
30 }
28df291d4e26 Updated documentation.
Robert Casties <r0bcas7@gmail.com>
parents:
diff changeset
31
28df291d4e26 Updated documentation.
Robert Casties <r0bcas7@gmail.com>
parents:
diff changeset
32 location / {
28df291d4e26 Updated documentation.
Robert Casties <r0bcas7@gmail.com>
parents:
diff changeset
33 proxy_pass http://localhost:8080;
28df291d4e26 Updated documentation.
Robert Casties <r0bcas7@gmail.com>
parents:
diff changeset
34 }
28df291d4e26 Updated documentation.
Robert Casties <r0bcas7@gmail.com>
parents:
diff changeset
35 }
28df291d4e26 Updated documentation.
Robert Casties <r0bcas7@gmail.com>
parents:
diff changeset
36 ```
28df291d4e26 Updated documentation.
Robert Casties <r0bcas7@gmail.com>
parents:
diff changeset
37
28df291d4e26 Updated documentation.
Robert Casties <r0bcas7@gmail.com>
parents:
diff changeset
38 ## Resources
28df291d4e26 Updated documentation.
Robert Casties <r0bcas7@gmail.com>
parents:
diff changeset
39
28df291d4e26 Updated documentation.
Robert Casties <r0bcas7@gmail.com>
parents:
diff changeset
40 - the [nginx documentation](nginx.org/en/docs/)