-
Notifications
You must be signed in to change notification settings - Fork 2
/
nginx.conf
41 lines (33 loc) · 991 Bytes
/
nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#user nobody
worker_processes 1;
error_log /var/log/nginx/error.log warn;
events {
worker_connections 1024;
}
http {
proxy_cache_path /data/nginx/cache keys_zone=mycache:20m max_size=1g inactive=60m;
limit_conn_zone $server_name zone=perserver:10m;
upstream backend {
server influxdb:8086;
keepalive 50;
}
server {
location /query {
proxy_cache mycache;
proxy_cache_key "$host$request_uri";
proxy_cache_min_uses 1;
proxy_cache_methods GET;
proxy_cache_valid 200 302 10m;
proxy_cache_valid 404 1m;
proxy_pass http://backend;
proxy_cache_background_update on;
proxy_cache_revalidate on;
proxy_cache_lock on;
add_header X-Cache-Status $upstream_cache_status;
proxy_ignore_headers Cache-Control;
}
location / {
proxy_pass http://influxdb:8086;
}
}
}