| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- events {
- worker_connections 1024;
- }
- http {
- include /etc/nginx/mime.types;
- default_type application/octet-stream;
- sendfile on;
- keepalive_timeout 65;
- client_max_body_size 200m;
- upstream backend {
- server ${BACKEND_HOST};
- }
- server {
- listen 80;
- root /usr/share/nginx/html;
- location / {
- try_files $uri $uri/ /index.html;
- }
- location /api/ {
- proxy_pass http://backend;
- proxy_set_header Host $host:$server_port;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded-Proto $scheme;
- proxy_set_header X-Forwarded-Port $server_port;
- proxy_http_version 1.1;
- proxy_set_header Connection "";
- proxy_read_timeout 1200s;
- proxy_buffering off;
- }
- location /health {
- return 200 'ok';
- add_header Content-Type text/plain;
- }
- error_page 500 502 503 504 /50x.html;
- location = /50x.html {
- root /usr/share/nginx/html;
- }
- }
- }
|