union.yoho.cn.conf.j2
1.63 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
server{
listen 80;
server_name union.yoho.cn webunion.yohobuy.com union.yoho.yohoops.org;
access_log /Data/logs/nginx/access_union.log union;
error_log /Data/logs/nginx/union_error.log;
location ^~ /admin {
{% for item in yoho_office_ips %}
allow {{ item }};
{% endfor %}
deny all;
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 {
{% for item in yoho_office_ips %}
allow {{ item }};
{% endfor %}
deny all;
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";
}
# for ios Universal Links
location /.well-known/apple-app-site-association {
root /Data/local/openresty-1.9.15.1/nginx/html/;
}
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;
}
}