-
Notifications
You must be signed in to change notification settings - Fork 121
/
nginx.conf
76 lines (57 loc) · 1.83 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
load_module modules/ngx_http_opentracing_module.so;
events {}
http {
opentracing on;
opentracing_load_tracer /usr/local/lib/liblightstep_tracer_plugin.so /etc/lightstep-config.json;
upstream backend {
server backend:3001;
server backend:3002;
server backend:3003;
}
server {
error_log /var/log/nginx/debug.log debug;
listen 8080;
server_name localhost;
location = / {
proxy_pass http://backend;
opentracing_tag nginx.upstream_addr $upstream_addr;
opentracing_propagate_context;
}
location = /animal {
opentracing_trace_locations off;
proxy_pass http://backend;
opentracing_tag nginx.upstream_addr $upstream_addr;
opentracing_propagate_context;
}
location = /upload/animal {
opentracing_location_operation_name upload;
opentracing_tag nginx.upstream_addr $upstream_addr;
opentracing_tag ngix.client_body_file $request_body_file;
opentracing_tag zoo.animal $http_admit_animal;
opentracing_tag zoo.name $http_admit_name;
limit_except POST { deny all; }
client_body_temp_path /tmp/;
client_body_in_file_only on;
client_body_buffer_size 128K;
client_max_body_size 1000M;
proxy_set_header admit-profile-pic $request_body_file;
proxy_set_body off;
proxy_redirect off;
proxy_pass http://backend;
proxy_intercept_errors on;
opentracing_propagate_context;
error_page 301 302 303 =200 /;
}
location / {
opentracing_operation_name $request_uri;
opentracing_trace_locations off;
root /app/www;
}
location ~ \.jpg$ {
# Tracing each image request creates a lot of noise, so disable
# opentracing for this location.
opentracing off;
root /app/data/images;
}
}
}