Files
hope-voice-api/nginx.conf
T
snowspeeder ce8fd1e046
Rebuild & Deploy / rebuild (push) Successful in 1m0s
fix: move media server to 8093 — YOURLS/Apache owns 8092 on xNAS
The Unraid deployment's /media/api requests were answered by an
Apache/YOURLS stack squatting on 8092, surfacing as UI 503s; the CI
healthcheck (curl without -f) counted that 503 as healthy, so run #15
deployed green against a broken media server.

- media server port 8092 -> 8093 everywhere (server, MCP, agent, nginx,
  compose, CI, .env.example, docs, tests).
- healthchecks use curl -f in compose and rebuild.yml so HTTP error
  statuses fail deployment.
- tests default to the Unraid deployment (VOICE_WEB_URL=
  https://192.168.86.2:9178); token goes through nginx (loopback :8091
  is unreachable off-host); bind-mount-coupled tests skip on remote
  targets. AGENTS.md documents the convention and both failure modes.
2026-08-29 16:01:26 -04:00

50 lines
1.4 KiB
Nginx Configuration File

server {
listen 9178 ssl;
root /var/www/voice;
index index.html;
ssl_certificate /etc/voice/certs/cert.pem;
ssl_certificate_key /etc/voice/certs/key.pem;
location /token {
proxy_pass http://127.0.0.1:8091/token;
}
location = /livekit {
return 301 /livekit/;
}
location /livekit/ {
proxy_pass http://127.0.0.1:7880/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
}
# Media server API (library, search, player state) and the proxy for
# external live-stream URLs (http:// sources would be blocked as mixed
# content in the browser, so they are re-served over HTTPS from here).
location /media/api/ {
proxy_pass http://127.0.0.1:8093/media/api/;
proxy_buffering off;
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
}
# Downloaded tracks are plain static files — nginx serves them with
# native HTTP Range support, which gives the web player seeking for free.
location /media/files/ {
alias /data/media/files/;
}
location /media/thumbs/ {
alias /data/media/thumbs/;
}
location / {
try_files $uri $uri/ =404;
}
}