Welcome! Log In Create A New Profile

Advanced

nginx-reverse-proxy-proxy-cache-inside-if-block-possible

sosogh@126.com
July 18, 2013 09:48PM
Hi

I am running a BBS server(nginx).
And now I want to setup a cache server (using nginx)in front of the BBS server to cache the pic .

The URL for the pic is something like this:
http://www.mysite.com/forum.php?mod=attachment&aid=MjIwODgyfDhiNWNiNzE4fDEzNzQxMTc1MzB8OTgyNzR8OTgwNw%3D%3D&noupdate=yes
It is not as usual as something like this --- http://www.mysite.com/img/xxxx.jpg

Following this page:
http://serverfault.com/questions/389571/nginx-reverse-proxy-proxy-cache-inside-if-block-possible

The cache config on the cache server is :(nginx version: nginx/1.1.19)

proxy_temp_path /nginx-cache/tmp 1 2;
proxy_cache_path /nginx-cache/cache1 levels=1:2 keys_zone=cache1:100m inactive=1d max_size=15g;

map $arg_mod $skip_cache {
default 1;
attachment 0;
}
log_format format1 '$remote_addr - $remote_user [$time_local] ' '"$request" $status $body_bytes_sent ' '"$http_referer" "$http_user_agent" $upstream_cache_status';
location /forum.php {
proxy_pass http://1.1.1.1; # 1.1.1.1 is the real ip of BBS server.
proxy_cache cache1;
proxy_cache_key $host$uri$is_args$args;
proxy_cache_valid 720m;
expires 3d;
proxy_cache_bypass $skip_cache;
proxy_no_cache $skip_cache;
}

When I access http://www.mysite.com/forum.php?mod=attachment&aid=MjIwODgyfDhiNWNiNzE4fDEzNzQxMTc1MzB8OTgyNzR8OTgwNw%3D%3D&noupdate=yes
on my IE.

I see the following log on cache server:
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;; .)" MISS

And at that moment,the pic did not shown on my IE.

My questions are:
What does "MISS" excatly mean?
Does it mean that cache server does not get the pic from BBS server ?
If so , why?
or are there any other ways to setup nginx cache for my situation?
And hint is appreciated.
Thank you !







sosogh@126.com_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

nginx-reverse-proxy-proxy-cache-inside-if-block-possible

sosogh@126.com July 18, 2013 09:48PM

Re: nginx-reverse-proxy-proxy-cache-inside-if-block-possible

mex July 19, 2013 04:26AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 271
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready