single.conf
1.39 KB
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
## dual centor, single services.
server {
listen 80 ;
server_name single.yohoops.org;
access_log /Data/logs/nginx/single.yohoops.org.log fenxi;
error_log /Data/logs/nginx/single.yohoops.org_error.log;
# only allow local
include ./local.access.conf;
if ( $request_method = HEAD ) {
return 200;
}
# single
location / {
proxy_redirect off;
proxy_pass http://apigateway/gateway;
proxy_set_header X-Real-IP $real_ip;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_http_version 1.1;
proxy_set_header Connection "";
}
location ^~ /activity/ {
proxy_redirect off;
proxy_pass http://activityApi/activity/;
proxy_set_header X-Real-IP $real_ip;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "gzip";
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_set_header Host $host;
}
location ^~ /union/ {
proxy_pass http://union_pools;
proxy_set_header X-Real-IP $real_ip;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "gzip";
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_set_header Host $host;
}
}