union.yoho.cn.conf
1.81 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
52
53
54
55
56
57
58
59
60
61
62
63
server{
listen 80;
server_name union.yoho.cn webunion.yohobuy.com;
access_log /Data/logs/nginx/access_union.log union;
location ^~ /admin {
if ( $proxy_add_x_forwarded_for !~* "(218.94.77.166|218.94.75.50|218.94.75.58|106.39.86.*|106.38.38.*)" ) {
return 401;
break;
}
proxy_redirect off;
proxy_pass http://union_pools/union/admin;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $http_x_forwarded_for;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "gzip";
}
location ^~ /union/admin {
if ( $proxy_add_x_forwarded_for !~* "(218.94.75.50|218.94.75.58|218.94.77.166|106.39.86.*|106.38.38.*)" ) {
return 401;
break;
}
proxy_redirect off;
proxy_pass http://union_pools/union/admin;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $http_x_forwarded_for;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "gzip";
}
location = /apple-app-site-association {
root /usr/local/nginx/html;
}
# for ios Universal Links
location /.well-known/apple-app-site-association {
alias /Data/local/openresty-1.9.15.1/nginx/conf;
}
location / {
proxy_redirect off;
proxy_pass http://union_pools;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $http_x_forwarded_for;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "gzip";
}
location ~* .(txt)$ {
root /Data/local/openresty-1.9.15.1/nginx/html;
}
}