Monorepo for Tangled tangled.org

docs/knot-hosting.md: add exemplar nginx config

Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.sh>

anirudh.fi 80dba691 ac5359ba

verified
Changed files
+33
docs
+33
docs/knot-hosting.md
··· 89 systemctl start knotserver 90 ``` 91 92 You should now have a running knot server! You can finalize your registration by hitting the 93 `initialize` button on the [/knots](/knots) page. 94
··· 89 systemctl start knotserver 90 ``` 91 92 + The last step is to configure a reverse proxy like Nginx or Caddy to front yourself 93 + knot. Here's an example configuration for Nginx: 94 + 95 + ``` 96 + server { 97 + listen 80; 98 + listen [::]:80; 99 + server_name knot.example.com; 100 + 101 + location / { 102 + proxy_pass http://localhost:5555; 103 + proxy_set_header Host $host; 104 + proxy_set_header X-Real-IP $remote_addr; 105 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 106 + proxy_set_header X-Forwarded-Proto $scheme; 107 + } 108 + 109 + # wss endpoint for git events 110 + location /events { 111 + proxy_set_header X-Forwarded-For $remote_addr; 112 + proxy_set_header Host $http_host; 113 + proxy_set_header Upgrade websocket; 114 + proxy_set_header Connection Upgrade; 115 + proxy_pass http://localhost:5555; 116 + } 117 + # additional config for SSL/TLS go here. 118 + } 119 + 120 + ``` 121 + 122 + Remember to use Let's Encrypt or similar to procure a certificate for your 123 + knot domain. 124 + 125 You should now have a running knot server! You can finalize your registration by hitting the 126 `initialize` button on the [/knots](/knots) page. 127