yohobuywap.conf
1.45 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
64
65
66
67
68
69
####################################################
### this is for m.yohobuy.com
#####################################################
server {
listen 80;
server_name m.yohobuy.com *.m.yohobuy.com;
root /Data/node/yohobuywap-node/current/yohobuywap-node/public/static;
access_log /Data/logs/nginx/access_wap.yohobuy.com.log fenxi;
error_log /Data/logs/nginx/error_wap.yohobuy.com.log warn;
error_page 503 /503.html;
if ($http_user_agent ~* "Scrapy") {
return 403;
}
######force https######
set $rewite 0;
if ($http_x_client_proto = 'http') {
set $rewite 1;
}
if ($http_x_forwarded_proto = 'http') {
set $rewite 1;
}
if ($rewite = 1) {
return 301 https://$host$request_uri ;
}
location ^~ /activity/vip-day {
return 301 http://m.yohobuy.com;
}
# nginx status check
location = /status_check {
default_type text/html;
return 200 'server is ok!';
}
location ~* .(txt)$ {
root /Data/node/yohobuywap-node/current/yohobuywap-node/public/static;
}
#cache config
include vhosts/wap/cache.conf;
#301 and idc
include vhosts/wap/301.conf;
#app
include vhosts/wap/app.conf;
#static
include vhosts/wap/static.conf;
#locations
include vhosts/wap/locations.conf;
location / {
#proxy
include vhosts/wap/node-proxy.conf;
}
}