78 lines
2.0 KiB
Nginx Configuration File
78 lines
2.0 KiB
Nginx Configuration File
server {
|
|
listen 80;
|
|
server_name _;
|
|
return 301 https://121.41.46.238$request_uri;
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl;
|
|
server_name 121.41.46.238;
|
|
server_tokens off;
|
|
client_max_body_size 256m;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/121.41.46.238/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/121.41.46.238/privkey.pem;
|
|
ssl_protocols TLSv1.2 TLSv1.3;
|
|
ssl_session_cache shared:SSL:10m;
|
|
ssl_session_timeout 1d;
|
|
|
|
add_header Strict-Transport-Security "max-age=31536000" always;
|
|
|
|
resolver 127.0.0.11 ipv6=off valid=10s;
|
|
set $api_backend http://api:8080;
|
|
set $callbacks_backend http://callbacks:8081;
|
|
set $keycloak_backend http://keycloak:8080;
|
|
set $minio_backend http://minio:9000;
|
|
set $web_backend http://web:8080;
|
|
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-Forwarded-Host $http_host;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_set_header X-Forwarded-Port $server_port;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
location /api/ {
|
|
proxy_pass $api_backend;
|
|
proxy_buffering off;
|
|
proxy_read_timeout 3600s;
|
|
}
|
|
|
|
location /device/ {
|
|
proxy_pass $api_backend;
|
|
proxy_buffering off;
|
|
}
|
|
|
|
# The voice provider can call only this signed, conversation-scoped tool.
|
|
# Do not expose the rest of the /internal namespace.
|
|
location = /internal/v1/tools/memory-search {
|
|
proxy_pass $api_backend;
|
|
proxy_buffering off;
|
|
proxy_request_buffering off;
|
|
}
|
|
|
|
location /callbacks/ {
|
|
proxy_pass $callbacks_backend;
|
|
proxy_buffering off;
|
|
}
|
|
|
|
location /realms/ {
|
|
proxy_pass $keycloak_backend;
|
|
}
|
|
|
|
location /resources/ {
|
|
proxy_pass $keycloak_backend;
|
|
}
|
|
|
|
location /private-exports/ {
|
|
proxy_pass $minio_backend;
|
|
proxy_request_buffering off;
|
|
proxy_buffering off;
|
|
}
|
|
|
|
location / {
|
|
proxy_pass $web_backend;
|
|
}
|
|
}
|