commit | author | age
|
181529
|
1 |
proxy_cache global; |
L |
2 |
proxy_redirect off; |
|
3 |
proxy_set_header Host $host; |
|
4 |
proxy_set_header X-Real-IP $remote_addr; |
|
5 |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
|
6 |
proxy_pass_header Set-Cookie; |
|
7 |
client_max_body_size 10m; |
|
8 |
client_body_buffer_size 128k; |
|
9 |
proxy_connect_timeout 90; |
|
10 |
proxy_send_timeout 90; |
|
11 |
proxy_read_timeout 90; |
|
12 |
proxy_buffers 32 4k; |
|
13 |
|
|
14 |
set $cache_key $scheme$host$uri$is_args$args$cookie_user; |
|
15 |
proxy_cache_key $cache_key; |
|
16 |
proxy_cache_valid 200 10h; |
|
17 |
expires 3d; |
|
18 |
|
|
19 |
### force timeouts if one of backend is died ## |
|
20 |
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503; |
|
21 |
|
|
22 |
location = /status { |
|
23 |
stub_status on; |
|
24 |
allow 127.0.0.1; |
|
25 |
allow 192.168.1.0; |
|
26 |
deny all; |
|
27 |
} |
|
28 |
|
|
29 |
location ~ /purge(/.*) { |
|
30 |
allow 127.0.0.1; |
|
31 |
allow 192.168.1.0; |
|
32 |
deny all; |
|
33 |
proxy_cache_purge global $cache_key; |
|
34 |
} |