-
Notifications
You must be signed in to change notification settings - Fork 1
/
nginx.conf
49 lines (35 loc) · 1.09 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
worker_processes 1;
error_log logs/error.log info;
pid logs/nginx.pid;
# load_module modules/ngx_http_response_body_module.so;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
log_format main $format $format;
access_log logs/access.log main;
expr_max_hash_size 10240;
server {
listen 4444;
location /test1 {
expr $format '1111 $remote_addr - $remote_user [$time_local] "$request" $status $request_time $upstream_addr';
return 200 test1;
}
location /test2 {
expr $format '2222 $remote_addr - $remote_user [$time_local] "$request" $status $request_time $upstream_addr';
return 200 test2;
}
location /test3 {
expr $format '3333 $remote_addr - $remote_user [$time_local] "$request" $status $request_time $upstream_addr';
echo_exec @inner1;
}
location @inner1 {
echo_exec @inner2;
}
location @inner2 {
return 200 $uri;
}
}
}