|  | @@ -0,0 +1,55 @@
 | 
	
		
			
				|  |  | +server
 | 
	
		
			
				|  |  | +{
 | 
	
		
			
				|  |  | +listen              80;
 | 
	
		
			
				|  |  | +server_name    0.0.0.0;
 | 
	
		
			
				|  |  | +####################################
 | 
	
		
			
				|  |  | +location /status {
 | 
	
		
			
				|  |  | +check_status;
 | 
	
		
			
				|  |  | +access_log   off;
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +####################################
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +location ^~/aw2016 {
 | 
	
		
			
				|  |  | +rewrite  ^.+  http://www.gdga.gov.cn/ztbd/aw2016/ last;
 | 
	
		
			
				|  |  | +break;
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +location / {
 | 
	
		
			
				|  |  | +        if ($http_cookie ~* ".*uid=([^;]+)")
 | 
	
		
			
				|  |  | +        {
 | 
	
		
			
				|  |  | +                set $udid $1;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +	if ($http_cookie ~* "wver=wechat")
 | 
	
		
			
				|  |  | +        {
 | 
	
		
			
				|  |  | +                set $openid $cookie_wx_openid;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        if ($http_cookie ~* "wver=alipay")
 | 
	
		
			
				|  |  | +        {
 | 
	
		
			
				|  |  | +                set $openid $cookie_alipay_openid;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +     #   if ($http_cookie ~* "wver=online_ta")
 | 
	
		
			
				|  |  | +     #   {
 | 
	
		
			
				|  |  | +     #           set $luid $cookie_luid;
 | 
	
		
			
				|  |  | +     #   }
 | 
	
		
			
				|  |  | + set $uid $cookie_uid;
 | 
	
		
			
				|  |  | +        if ($uid = ""){
 | 
	
		
			
				|  |  | +            set $uid 0;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +proxy_pass   http://backend;
 | 
	
		
			
				|  |  | +error_page 404 = http://wap.easou.com;
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +location ~* \.(css|css\?.*|js|js\?.*|gif|jpg|jpeg|png|ico)$ {
 | 
	
		
			
				|  |  | +        proxy_cache easou;
 | 
	
		
			
				|  |  | +        proxy_cache_valid 200 10m;
 | 
	
		
			
				|  |  | +        proxy_pass   http://backend;
 | 
	
		
			
				|  |  | +        expires 24h;
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +log_format www.easou.com  'v2{]easou.com{]$request{]$upstream_http_esid{]$year$month$day $hour$minute$second{]$status{]-{]$request_time{]$body_bytes_sent{]$bytes_sent{]$remote_addr{]$http_x_forwarded_for{]$http_referer{]$sent_http_mobile{]$http_user_agent{]_$upstream_http_mid{]$udid{]$http_via{]$uid{]$cookie_cid{]$openid{]v2';
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +access_log /log/nginx/visit/access.log www.easou.com buffer=32k;
 | 
	
		
			
				|  |  | +include vhosts/www/hostlist.conf;
 |