From 6090d8f5966235645fce16867b222bff49976a52 Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Thu, 22 Jan 2026 16:23:14 -0700 Subject: [PATCH] Add nginx config --- README.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/README.md b/README.md index cd0e63f..08529f8 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,41 @@ $ sudo docker compose up --build -d Set up nginx / a reverse proxy and point it to the web app. +Make sure it allows WebSocket connections through, for example: + +``` +server { + root /var/www/html; + index index.html index.htm; + server_name upload.example.com; + + listen 80; + + client_max_body_size 100M; + + location / { + proxy_pass http://127.0.0.1:8080/; + proxy_set_header Host $http_host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + + # websockets + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_redirect off; + } +} +``` + +Then restart nginx and set up HTTPS: + +``` +$ sudo service nginx restart +$ sudo certbot --nginx +``` + ### Config Changes