使用Nginx的proxy_cache缓存静态文件
分类:运维技术日期:2012-03-15 - 20:41:49评论:6条作者:老谢
咦?我不是该在学习ccnp的路由部分么?为什么又搞上nginx了?啊!蛋开始痛了。。写完这篇继续看我的np去,Orz…
安装Nginx — 更详细的请看:http://www.xj123.info/2416.html
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.30.tar.gz tar -zxf pcre-8.30.tar.gz wget http://sourceforge.net/projects/libpng/files/zlib/1.2.6/zlib-1.2.6.tar.gz/download tar -zxf zlib-1.2.6.tar.gz wget http://labs.frickle.com/files/ngx_cache_purge-1.5.tar.gz tar -zxf ngx_cache_purge-1.5.tar.gz wget http://nginx.org/download/nginx-1.0.13.tar.gz tar -zxf nginx-1.0.13.tar.gz cd nginx-1.0.13 ./configure --prefix=/usr/local/nginx \ --user=www \ --group=www \ --with-http_ssl_module \ --with-http_dav_module \ --with-http_flv_module \ --with-http_realip_module \ --with-http_gzip_static_module \ --with-http_stub_status_module \ --with-mail --with-mail_ssl_module \ --with-pcre=../pcre-8.30 \ --with-zlib=../zlib-1.2.6 \ --add-module=../ngx_cache_purge-1.5 \ --with-debug \ --http-client-body-temp-path=/var/tmp/nginx/client \ --http-proxy-temp-path=/var/tmp/nginx/proxy \ --http-fastcgi-temp-path=/var/tmp/nginx/fastcgi \ --http-uwsgi-temp-path=/var/tmp/nginx/uwsgi \ --http-scgi-temp-path=/var/tmp/nginx/scgi make && make install ln -s /usr/local/nginx/sbin/nginx /usr/sbin/ mkdir /var/tmp/nginx/cache |
配置文件直接贴出来了,俺也不怕丑了。。(#号后面的内容为注释)
最新评论
zwwooooo:类似以前做网站开发时,一开始有自...
老陳网志:有点高端,像我们整点nas玩玩就够...
springwood:自从 CentOS 不维护之后,我换 U...
大D:难都搞下来了,那就更得YM了
大D:只能是YM了,谢总牛啊
灰常记忆:经济不好 今年我也换了机器 一...
大峰:这是海外服务器嘛?速度挺快的。
大D:只能单走一个6了哈哈哈
zwwooooo:买特斯拉和买iPhone的人群其实相似...
平安家属子痕:一直坚持油车,看你写的心里有...