action.yohocn.conf
1.38 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
server {
listen 80 ;
proxy_http_version 1.1;
proxy_set_header Connection "";
server_name action.yoho.cn ;
error_log /Data/logs/nginx/error_action.yoho.cn.log error;
access_log /Data/logs/nginx/access_action.yoho.cn.log fenxi;
# nginx status check
location = /status_check {
default_type text/html;
return 200 'action.yoho.cn server is ok!';
}
location / {
limit_req zone=allips_per_ip_20 burst=5 nodelay;
limit_req zone=limit_per_url_100 burst=10 nodelay;
proxy_redirect off;
proxy_pass http://yoho-web-new-inner;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $http_x_forwarded_for;
proxy_set_header X-Yoho-Real-IP $http_x_forwarded_for;
proxy_set_header X-Forwarded-For $http_x_forwarded_for;
proxy_set_header Accept-Encoding "gzip";
}
location /api/ {
limit_req zone=allips_per_ip_20 burst=5 nodelay;
limit_req zone=limit_per_url_50 burst=10 nodelay;
proxy_redirect off;
proxy_pass http://yoho-web-new-inner;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $http_x_forwarded_for;
proxy_set_header X-Yoho-Real-IP $http_x_forwarded_for;
proxy_set_header X-Forwarded-For $http_x_forwarded_for;
proxy_set_header Accept-Encoding "gzip";
}
}