+ -
当前位置:首页 → 问答吧 → nginx if ( !-e $request_filename) 的问题

nginx if ( !-e $request_filename) 的问题

时间:2011-06-10

来源:互联网

Nginx Cache服务配置

在经过上一步配置之后,虽然文件被缓存到了本地磁盘上,但每次请求仍会向远端拉取
文件,为了避免去远端拉取文件,必须修改proxy_pass:
if ( !-e $request_filename) {
  proxy_pass http://mysvr;
}
我设置了这个之后,每次访问www.xxx.cn的时候,都会跳转到welcome to nginx!页面。怎么回事?

作者: lzj0472   发布时间: 2011-06-10

帮顶 避免悲剧

作者: inetfuture   发布时间: 2011-06-10