56086486e928825a2120d948e4caa401d908e6f3
services/Distributed-Wiki.md
... | ... | @@ -41,18 +41,18 @@ Since gollum is built on top of Git, it is not overly complicated to keep the lo |
41 | 41 | |
42 | 42 | + **wiki-sync.sh**: |
43 | 43 | |
44 | - ```sh |
|
45 | -#!/bin/bash |
|
46 | - |
|
47 | -WIKI_PATH=<repo path> |
|
48 | -GIT=/usr/bin/git |
|
49 | - |
|
50 | -cd "${WIKI_PATH}" |
|
51 | -${GIT} push |
|
52 | -${GIT} pull |
|
53 | - |
|
54 | -exit 0 |
|
55 | - ``` |
|
44 | + ```sh |
|
45 | + #!/bin/bash |
|
46 | + |
|
47 | + WIKI_PATH=<repo path> |
|
48 | + GIT=/usr/bin/git |
|
49 | + |
|
50 | + cd "${WIKI_PATH}" |
|
51 | + ${GIT} push |
|
52 | + ${GIT} pull |
|
53 | + |
|
54 | + exit 0 |
|
55 | + ``` |
|
56 | 56 | |
57 | 57 | + **Cron entry**: |
58 | 58 | |
... | ... | @@ -66,15 +66,15 @@ exit 0 |
66 | 66 | - Start two gollum instances, read-only and read/write on `127.0.0.1`: |
67 | 67 | |
68 | 68 | Read/write (SSL only): |
69 | - ``` |
|
70 | -RACK_ENV=production gollum --css --host 127.0.0.1 --port 4568 <path> |
|
71 | - ``` |
|
69 | + ``` |
|
70 | + RACK_ENV=production gollum --css --host 127.0.0.1 --port 4568 <path> |
|
71 | + ``` |
|
72 | 72 | Read-only: |
73 | - ``` |
|
74 | -RACK_ENV=production gollum --css --host 127.0.0.1 --port 4567 --no-edit <path> |
|
75 | - ``` |
|
73 | + ``` |
|
74 | + RACK_ENV=production gollum --css --host 127.0.0.1 --port 4567 --no-edit <path> |
|
75 | + ``` |
|
76 | 76 | |
77 | - Set `<path>` to the location where wiki Git repo was cloned. |
|
77 | + Set `<path>` to the location where wiki Git repo was cloned. |
|
78 | 78 | |
79 | 79 | ## Nginx reverse proxy |
80 | 80 | |
... | ... | @@ -110,13 +110,13 @@ A custom header `X-SiteID` identifies the site you're connecting to: |
110 | 110 | - Extract base64 encoded SPKI fingerprint from private key `wiki.key`: |
111 | 111 | |
112 | 112 | ```sh |
113 | -openssl rsa -in wiki.key -outform der -pubout | openssl dgst -sha256 -binary | openssl enc -base64 |
|
113 | + openssl rsa -in wiki.key -outform der -pubout | openssl dgst -sha256 -binary | openssl enc -base64 |
|
114 | 114 | ``` |
115 | 115 | |
116 | 116 | - Configure Nginx to send the fingerprint in header (SSL block): |
117 | 117 | |
118 | 118 | ```conf |
119 | -add_header Public-Key-Pins pin-sha256="<primary>"; pin-sha256="<backup>"; max-age=5184000; includeSubDomains'; |
|
119 | + add_header Public-Key-Pins pin-sha256="<primary>"; pin-sha256="<backup>"; max-age=5184000; includeSubDomains'; |
|
120 | 120 | ``` |
121 | 121 | |
122 | 122 | + `<primary>` - the fingerprint extracted from `wiki.key` |