<html><head><meta http-equiv="content-type" content="text/html; charset=GB2312"><style>body { line-height: 1.5; }body { font-size: 10.5pt; font-family: Î¢ÈíÑźÚ; color: rgb(0, 0, 0); line-height: 1.5; }</style></head><body>
<div><span></span>hi</div><div>  <span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">I use ngx_http_proxy_module to realize the static resource cache,</span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">Unable to generate a cache file£¬</span><span left-pos="0|9" right-pos="0|9" space="" style="font-size: 10.5pt; background-color: window; color: rgb(51, 51, 51); font-family: arial; line-height: 22px;">Below is the</span><span left-pos="9|22" right-pos="9|22" space="0| " class="" style="font-size: 10.5pt; background-color: window; color: rgb(51, 51, 51); font-family: arial; line-height: 22px;"> nginx.conf configuration information£¬</span><span style="color: rgb(51, 51, 51); font-family: arial; font-size: 10.5pt; line-height: 1.5; background-color: window;">Trouble you to help have a look what is the reason¡£</span></div><div><span style="font-family: arial; color: rgb(51, 51, 51);">worker_processes  4;
<br> 
<br>events {
<br>    use epoll;
<br>    worker_connections  1024;
<br>} 
<br>http {
<br>    include       mime.types;
<br>    default_type  application/octet-stream; 
<br>    access_log  logs/access.log  main;
<br>
<br>    sendfile        on;
<br>    #tcp_nopush     on;
<br>
<br>    #keepalive_timeout  0;
<br>    keepalive_timeout  65;
<br>    
<br>    proxy_temp_path /home/se/nginx_cache/tmp_nc1 1 2;
<br>    proxy_cache_path /home/se/nginx_cache/nc1 levels=1:2 keys_zone=nc1:50m; 
<br>    
<br>    upstream bj{ 
<br>       server 192.168.1.107:7111;
<br>    }
<br>    upstream noBj{ 
<br>       server 192.168.1.106:7111;
<br>    }
<br>
<br>    server {
<br>        listen       50001;
<br>        server_name  localhost;
<br> 
<br>        access_log  logs/host.access.log  main;
<br>
<br>        location / { 
<br>            proxy_set_header Host $host:20001;
<br>            proxy_redirect off;
<br>            proxy_set_header X-Real-IP $remote_addr;
<br>            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
<br>            proxy_next_upstream http_502 http_504 error timeout invalid_header;
<br>
<br>           if ( $geoip_city != 'Beijing' ){
<br>              proxy_pass http://noBj;
<br>           }
<br>
<br>           if ( $geoip_city = 'Beijing' ){
<br>               proxy_pass http://bj;
<br>           } 
<br>      
<br>        }
<br>
<br>        location ~*\.(jpg|gif|png|css|swf|js)$ {
<br>           if ( $geoip_city != 'Beijing' ){
<br>                proxy_pass http://noBj;
<br>           }
<br>
<br>           if ( $geoip_city = 'Beijing' ){
<br>               proxy_pass http://bj;
<br>           }
<br>
<br>         proxy_cache nc1;
<br>proxy_cache_valid 200 302 304 1d;
<br>           proxy_cache_key $host$uri$is_args$args;     
<br>
<br>           proxy_cache_lock on;
<br>           proxy_cache_lock_timeout 2s;
<br>           expires 1d;
<br>      }  
<br>}</span></div>
<div><br></div><div><img src="cid:_Foxmail.1@447e4835-2df5-21ed-0c4e-ba34a017a97f" border="0"></div><hr style="width: 210px; height: 1px;" color="#b5c4df" size="1" align="left">
<div><span><div style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt"><div>gaoping@richinfo.cn</div></div></span></div>
</body></html>