<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<STYLE>
BLOCKQUOTE {
MARGIN-BOTTOM: 0px; MARGIN-LEFT: 2em; MARGIN-TOP: 0px
}
OL {
MARGIN-BOTTOM: 0px; MARGIN-TOP: 0px
}
UL {
MARGIN-BOTTOM: 0px; MARGIN-TOP: 0px
}
P {
MARGIN-BOTTOM: 0px; MARGIN-TOP: 0px
}
BODY {
FONT-SIZE: 10.5pt; FONT-FAMILY: ΢ÈíÑźÚ; COLOR: #000000; LINE-HEIGHT: 1.5
}
</STYLE>
<META name=GENERATOR content="MSHTML 10.00.9200.16635"></HEAD>
<BODY style="MARGIN: 10px">
<DIV>
<DIV style="FONT-SIZE: 12pt">
<DIV>Hi</DIV>
<DIV> </DIV>
<DIV>I am running a BBS server(nginx).</DIV>
<DIV>And now I want to setup a cache server (using nginx)in front of the BBS server to cache the pic .</DIV>
<DIV> </DIV>
<DIV>The URL for the pic is something like this:</DIV>
<DIV>http://www.mysite.com/forum.php?mod=attachment&aid=MjIwODgyfDhiNWNiNzE4fDEzNzQxMTc1MzB8OTgyNzR8OTgwNw%3D%3D&noupdate=yes</DIV>
<DIV>It is not as usual as something like this --- http://www.mysite.com/img/xxxx.jpg</DIV>
<DIV> </DIV>
<DIV>Following this page:</DIV>
<DIV>http://serverfault.com/questions/389571/nginx-reverse-proxy-proxy-cache-inside-if-block-possible </DIV>
<DIV> </DIV>
<DIV>The cache config on the cache server is :(nginx version: nginx/1.1.19)</DIV>
<DIV> </DIV>
<DIV>proxy_temp_path /nginx-cache/tmp 1 2;</DIV>
<DIV>proxy_cache_path /nginx-cache/cache1 levels=1:2 keys_zone=cache1:100m inactive=1d max_size=15g;</DIV>
<DIV> </DIV>
<DIV>map $arg_mod $skip_cache { </DIV>
<DIV>default 1;</DIV>
<DIV>attachment 0; </DIV>
<DIV>} </DIV>
<DIV></DIV>
<DIV>log_format format1 '$remote_addr - $remote_user [$time_local] ' '"$request" $status $body_bytes_sent ' '"$http_referer" "$http_user_agent" $upstream_cache_status';</DIV>
<DIV></DIV>
<DIV>location /forum.php {</DIV>
<DIV> proxy_pass http://1.1.1.1; # 1.1.1.1 is the real ip of BBS server.</DIV>
<DIV> proxy_cache cache1;</DIV>
<DIV> proxy_cache_key $host$uri$is_args$args;</DIV>
<DIV>proxy_cache_valid 720m;</DIV>
<DIV> expires 3d;</DIV>
<DIV> proxy_cache_bypass $skip_cache;</DIV>
<DIV> proxy_no_cache $skip_cache;</DIV>
<DIV>}</DIV>
<DIV> </DIV>
<DIV>When I access http://www.mysite.com/forum.php?mod=attachment&aid=MjIwODgyfDhiNWNiNzE4fDEzNzQxMTc1MzB8OTgyNzR8OTgwNw%3D%3D&noupdate=yes</DIV>
<DIV>on my IE.</DIV>
<DIV> </DIV>
<DIV>I see the following log on cache server:</DIV>
<DIV>client IP - - [18/Jul/2013:14:21:37 +0400] "GET /forum.php?mod=attachment&aid=MjIwODgyfDhiNWNiNzE4fDEzNzQxMTc1MzB8OTgyNzR8OTgwNw%3D%3D&noupdate=yes HTTP/1.1" 200 4194 "http://www.mysite.com/thread-9971-1-1.html" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/6.0;; .)" <SPAN
style="COLOR: #ff0000">MISS</SPAN></DIV>
<DIV> </DIV>
<DIV>And at that moment,the pic did not shown on my IE.</DIV>
<DIV> </DIV>
<DIV>My questions are:</DIV>
<DIV>What does "MISS" excatly mean?</DIV>
<DIV>Does it mean that cache server does not get the pic from BBS server ?</DIV>
<DIV>If so , why? </DIV>
<DIV>or are there any other ways to setup nginx cache for my situation? </DIV>
<DIV>And hint is appreciated.</DIV>
<DIV>Thank you !</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV></DIV></DIV>
<DIV> </DIV>
<HR style="HEIGHT: 1px; WIDTH: 210px" align=left color=#b5c4df SIZE=1>
<DIV><SPAN>sosogh@126.com</SPAN></DIV></BODY></HTML>