Files
hope-voice-api/nginx.conf
T

52 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;
client_max_body_size 16k;
# Public certificate-only onboarding profile lives in the persistent cert
# mount. Never expose that directory: it also contains the private key.
location = /hope-server.mobileconfig {
alias /etc/voice/certs/hope-server.mobileconfig;
default_type application/x-apple-aspen-config;
add_header Cache-Control "no-store";
}
location = /token {
proxy_pass http://127.0.0.1:8091/token;
proxy_set_header Host $host;
}
# The private control/provisioning endpoints are never proxied.
location /api/ {
proxy_pass http://127.0.0.1:8092/api/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_read_timeout 30s;
}
location /internal/ {
return 404;
}
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;
}
location / {
try_files $uri $uri/ =404;
}
}