forked from mtusi2026/mtusi2026lab3
32 lines
798 B
Nginx Configuration File
32 lines
798 B
Nginx Configuration File
events {}
|
|
|
|
http {
|
|
access_log /dev/stdout;
|
|
error_log /dev/stderr notice;
|
|
|
|
resolver 127.0.0.11 valid=2s ipv6=off;
|
|
|
|
upstream messenger_api {
|
|
zone messenger_api 64k;
|
|
include /run/nginx-upstream.conf;
|
|
keepalive 16;
|
|
}
|
|
|
|
server {
|
|
listen 8080;
|
|
|
|
location / {
|
|
proxy_pass http://messenger_api;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Connection "";
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_connect_timeout 500ms;
|
|
proxy_send_timeout 12s;
|
|
proxy_read_timeout 12s;
|
|
proxy_next_upstream error timeout http_502 http_503 http_504;
|
|
proxy_next_upstream_tries 2;
|
|
}
|
|
}
|
|
}
|