forked from mtusi2026/mtusi2026lab4
29 lines
789 B
Nginx Configuration File
29 lines
789 B
Nginx Configuration File
worker_processes auto;
|
|
events { worker_connections 4096; }
|
|
|
|
http {
|
|
# Docker's embedded DNS. nginx будет обращаться сюда за IP реплик.
|
|
resolver 127.0.0.11 valid=2s ipv6=off;
|
|
resolver_timeout 5s;
|
|
|
|
server {
|
|
listen 8080;
|
|
client_max_body_size 12m;
|
|
|
|
location / {
|
|
set $api_backend http://api:8080;
|
|
|
|
proxy_pass $api_backend;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Connection "";
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
proxy_connect_timeout 2s;
|
|
proxy_send_timeout 15s;
|
|
proxy_read_timeout 15s;
|
|
|
|
proxy_next_upstream error timeout http_502 http_503 http_504;
|
|
}
|
|
}
|
|
} |