| worker_processes 1; |
| events { worker_connections 256; } |
|
|
| http { |
| include /etc/nginx/mime.types; |
| default_type application/octet-stream; |
| sendfile on; |
| server_tokens off; |
|
|
| upstream backend { server 127.0.0.1:8000; } |
| upstream frontend { server 127.0.0.1:3000; } |
|
|
| server { |
| listen 7860 default_server; |
| client_max_body_size 1m; |
|
|
| |
| location /api/investigate { |
| proxy_pass http://backend; |
| proxy_http_version 1.1; |
| proxy_set_header Connection ""; |
| proxy_set_header Host $host; |
| proxy_buffering off; |
| proxy_cache off; |
| proxy_read_timeout 1h; |
| chunked_transfer_encoding on; |
| add_header X-Accel-Buffering no; |
| } |
|
|
| location /api/ { |
| proxy_pass http://backend; |
| proxy_http_version 1.1; |
| proxy_set_header Host $host; |
| } |
|
|
| location / { |
| proxy_pass http://frontend; |
| proxy_http_version 1.1; |
| proxy_set_header Host $host; |
| proxy_set_header Upgrade $http_upgrade; |
| proxy_set_header Connection "upgrade"; |
| } |
| } |
| } |
|
|