-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
82 lines (69 loc) · 2.51 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
daemon off;
worker_processes auto;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
vhost_traffic_status_zone shared:vhost_traffic_status:16m;
log_format json escape=json '{'
'"user_agent": "$http_user_agent", '
'"body_bytes_sent": "$body_bytes_sent", '
'"bytes_sent": "$bytes_sent", '
'"clientip": "$remote_addr", '
'"http_host": "$http_host", '
'"log_timestamp": "$time_local", '
'"proxy_host": "$proxy_host", '
'"referrer": "$http_referer", '
'"request": "$request", '
'"request_time": $request_time, '
'"status": $status, '
'"type": "ingress.nginx.access-log", '
'"upstream_addr": "$upstream_addr", '
'"upstream_response_time": "$upstream_response_time", '
'"upstream_status": "$upstream_status", '
'"x_forwarded_for": "$http_x_forwarded_for", '
'"x_forwarded_port": "$http_x_forwarded_port", '
'"x_forwarded_proto": "$http_x_forwarded_proto"'
'}';
access_log /var/log/nginx/access.log json;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
gzip on;
gzip_http_version 1.0;
gzip_comp_level 2;
gzip_proxied any;
gzip_vary on;
gzip_types application/x-javascript application/xhtml+xml application/xml application/xml+rss text/css text/javascript text/plain text/xml;
gzip_min_length 1000;
gzip_disable "MSIE [1-6].(?!.*SV1)";
variables_hash_max_size 1024;
variables_hash_bucket_size 64;
server_names_hash_bucket_size 128;
types_hash_max_size 2048;
types_hash_bucket_size 64;
client_max_body_size 100m;
proxy_read_timeout 60;
proxy_buffers 256 32k;
proxy_busy_buffers_size 64k;
include "/etc/nginx/conf.d/*.conf";
server {
# port to listen on. Can also be set to an IP:PORT
listen env_port;
location env_healthcheck_location {
return 200 'pong';
allow 127.0.0.1;
allow env_pod_cidr;
deny all;
}
location env_metrics_location {
vhost_traffic_status_display;
vhost_traffic_status_display_format html;
allow 127.0.0.1;
allow env_pod_cidr;
deny all;
}
}
}