action.yohocn.conf 1.38 KB
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"; 
    }
}