benjamin-paine's picture
tune nginx, mini header
a48ebd4
worker_processes auto;
worker_cpu_affinity auto;
error_log stderr;
daemon off;
pid /app/nginx.pid;
events {
worker_connections 256;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 7860;
# Proxy `/overseer` to WebSocket server on port 32189
location /overseer {
proxy_pass http://127.0.0.1:32189;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Host $host;
}
# Proxy `/dispatcher` to WebSocket server on port 32189
location /dispatcher {
proxy_pass http://127.0.0.1:32190;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Host $host;
}
# Proxy `/text-generation` to WebSocket server on port 32191
location /text-generation {
proxy_pass http://127.0.0.1:32191;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Host $host;
}
# Proxy `/audio-transcription` to WebSocket server on port 32192
location /audio-transcription {
proxy_pass http://127.0.0.1:32192;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Host $host;
}
# Proxy `/speech-synthesis` to WebSocket server on port 32193
location /speech-synthesis {
proxy_pass http://127.0.0.1:32193;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Host $host;
}
# Default: Serve static files from /var/www
location / {
root /app/www;
index index.html;
}
}
}