+33
docs/knot-hosting.md
+33
docs/knot-hosting.md
···
89
89
systemctl start knotserver
90
90
```
91
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
+
92
125
You should now have a running knot server! You can finalize your registration by hitting the
93
126
`initialize` button on the [/knots](/knots) page.
94
127