Add nginx config

This commit is contained in:
2026-01-22 16:23:14 -07:00
parent 205d62a634
commit 6090d8f596

View File

@@ -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