使用Nginx的proxy_cache缓存静态文件
分类:运维技术日期:2012-03-15 - 20:41:49评论:9条作者:老谢
咦?我不是该在学习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:买特斯拉和买iPhone的人群其实相似...
平安家属子痕:一直坚持油车,看你写的心里有...
秦大叔:室内每年能开2万公里电车确实划算 ...
灰常记忆:尊贵的特斯拉车主啊,对了一直对单...
拳废神域界:我的车现在平常跑不了啥,就放假...
大峰:电车起步超级快,我油车反正是跟不上,...
Mr.Chou:电车高速上真120和油车120真的有区...
Mr.Chou:18 19年入手的房子现在死的心都有了...
老何:不至于跌得这么狠吧
Andy烧麦:这些大厂都能提供必要的售后