首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 开源软件 >

nginx 加上驱除缓存的功能

2013-07-08 
nginx 加上清除缓存的功能server??????? {??????????????? listen?????? 80??????????????? server_name?

nginx 加上清除缓存的功能

server
??????? {
??????????????? listen?????? 80;
??????????????? server_name? mm.xxx.com vv.xxx.com ww.xxx.com bb.xxx.com aa.xxx.com ss.xxx.com cc.xxx.com;
??????????????? if ( $host ~* (.*)\.(.*)\.(.*))
??????????????? {
??????????????????????? set $domain $1;
??????????????? }
??????????????? index index.html index.htm index.php;
??????????????? root? /var/www/$domain;

??????????????? add_header Cache-Control no-cache;
??????????????? add_header Cache-Control private;

??????????????? location ~ .*\.(php|php5)?$
??????????????????????? {
??????????????????????????????? fastcgi_pass? 127.0.0.1:9000;
??????????????????????????????? fastcgi_index index.php;
??????????????????????????????? include fcgi.conf;
??????????????????????? }

??????????????? location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
??????????????????????? {
??????????????????????????????? expires????? 30d;
??????????????????????? }

??????????????? location ~ .*\.(js|css)?$
??????????????????????? {
??????????????????????????????? expires????? 12h;
??????????????????????? }

??????? }

热点排行