pid /tmp/nginx.pid; | |
worker_processes auto; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include /etc/nginx/mime.types; | |
default_type application/octet-stream; | |
sendfile on; | |
keepalive_timeout 65; | |
server { | |
listen 7860; | |
server_name _; | |
root /usr/share/nginx/html; | |
index index.html; | |
location / { | |
try_files $uri $uri/ /index.html; | |
} | |
location /api/ { | |
proxy_pass http://127.0.0.2:5001/; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "upgrade"; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_buffering off; | |
proxy_connect_timeout 3000s; | |
proxy_send_timeout 3000s; | |
proxy_read_timeout 3000s; | |
proxy_redirect off; | |
} | |
} | |
} | |