/
nginx.conf
100 lines (76 loc) · 1.41 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
events {
multi_accept on;
worker_connections 1024;
}
pid /tmp/nginx.pid;
http {
error_log off;
access_log off;
server {
listen 8080;
server_name _;
#http://nginx.org/en/docs/http/ngx_http_core_module.html#location
add_header X-URI "$host $request_uri $uri";
return 204;
}
upstream backend {
server 127.0.0.1:8080;
}
proxy_set_header Host $host;
server {
listen 80;
server_name _;
location /test01 {
proxy_pass http://backend;
}
location /test02 {
proxy_pass http://backend/;
}
location /test03/ {
proxy_pass http://backend;
}
location /test04/ {
proxy_pass http://backend/;
}
location /test05 {
proxy_pass http://backend/app1;
}
location /test06 {
proxy_pass http://backend/app1/;
}
location /test07/ {
proxy_pass http://backend/app1;
}
location /test08/ {
proxy_pass http://backend/app1/;
}
}
server {
listen 80;
server_name a.com;
location / {
proxy_pass http://backend;
}
}
server {
listen 80;
server_name b.com;
location / {
proxy_pass http://backend/;
}
}
server {
listen 80;
server_name c.com;
location / {
proxy_pass http://backend/app1;
}
}
server {
listen 80;
server_name d.com;
location / {
proxy_pass http://backend/app2/;
}
}
}