nginx needs to serve downloads from the media directory.

This commit is contained in:
Roland 2024-10-01 11:30:23 -06:00
parent 04dbca7bb7
commit 00c4e6ece0
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
9 changed files with 12 additions and 15 deletions

View file

@ -4,7 +4,8 @@ Wants=wrolpi-api.service
PartOf=wrolpi.target
[Service]
ExecStart=/usr/local/bin/serve -s build -l 5000
# Use development React app
ExecStart=/usr/bin/npm run start
Group=wrolpi
User=wrolpi
WorkingDirectory=/opt/wrolpi/app/

View file

@ -14,12 +14,12 @@ location /apple-touch-icon.png {
location / {
# React APP
proxy_pass http://0.0.0.0:5000;
proxy_pass http://0.0.0.0:3000;
rewrite $1 break;
}
location /ws {
proxy_pass http://0.0.0.0:5000;
proxy_pass http://0.0.0.0:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
@ -69,5 +69,5 @@ location /download {
autoindex on;
autoindex_exact_size off;
alias /opt/media;
alias /media/wrolpi;
}