aboutsummaryrefslogtreecommitdiffstats
path: root/docs/reverse_proxy.md
diff options
context:
space:
mode:
authorLev Gorodetskiy <github@droserasprout.space>2022-09-02 17:50:01 -0300
committerLev Gorodetskiy <github@droserasprout.space>2022-09-02 17:50:01 -0300
commit200bddf616946ab625d31564fc931f48915702e3 (patch)
tree7d720573ff244352c2aee09135cc4b7751e8a495 /docs/reverse_proxy.md
parent3c4ce3c0ee5a178dd14fab06575acca39a36c6b2 (diff)
parentb2611b3e94b11853f576cffce371f9ed264d4841 (diff)
downloadslskd-200bddf616946ab625d31564fc931f48915702e3.tar.gz
Merge branch 'master' into aux/docs-proofreading
Diffstat (limited to 'docs/reverse_proxy.md')
-rw-r--r--docs/reverse_proxy.md41
1 files changed, 41 insertions, 0 deletions
diff --git a/docs/reverse_proxy.md b/docs/reverse_proxy.md
new file mode 100644
index 00000000..1ae2d4ed
--- /dev/null
+++ b/docs/reverse_proxy.md
@@ -0,0 +1,41 @@
+# Running slskd Behind a Reverse Proxy
+
+## NGINX
+
+Because slskd uses websockets in addition to standard HTTP traffic, a couple of headers need to be defined along with the standard `proxy_pass` to enable everything to work properly.
+
+Assuming a default NGINX installation, create `/etc/nginx/conf.d/slskd.conf` and populate it with one of the configurations below, depending on whether you'd like to serve slskd from a subdirectory or the root of the webserver.
+
+### At a Subdirectory
+
+In this scenario `URL_BASE` must be set to `/slskd`
+
+```
+server {
+ listen 8080;
+
+ location /slskd {
+ proxy_pass http://localhost:5000;
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Connection "Upgrade";
+ proxy_set_header Host $host;
+ }
+}
+```
+
+### At the Root
+
+In this scenario `URL_BASE` is left to the default value of `/`
+
+```
+server {
+ listen 8080;
+
+ location / {
+ proxy_pass http://localhost:5000;
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Connection "Upgrade";
+ proxy_set_header Host $host;
+ }
+}
+``` \ No newline at end of file