перенесенная вторая и лабораторная 3
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
events {}
|
||||
|
||||
http {
|
||||
upstream messenger_api {
|
||||
server api1:8080 max_fails=2 fail_timeout=5s;
|
||||
server api2:8080 max_fails=2 fail_timeout=5s;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
proxy_connect_timeout 2s;
|
||||
proxy_read_timeout 10s;
|
||||
proxy_next_upstream error timeout http_502 http_503 http_504;
|
||||
location / {
|
||||
proxy_pass http://messenger_api;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user