+ -
当前位置:首页 → 问答吧 → nginx的一点配置问题

nginx的一点配置问题

时间:2010-06-13

来源:互联网

我想配置这样:访问的文件如果存在,就正常返回,如果是php文件,就交给php-cgi处理,如果文件不存在,就运行web根目录下的index.php。

php-cgi的端口是127.0.0.1:9000。这规则怎么写呢?

作者: xiaoking288   发布时间: 2010-06-13

if (!-f $request_filename) {
  break;
  proxy_pass  http://127.0.0.1;
}



checking for the existence of a file using the -f and !-f operators;

作者: maochanglu   发布时间: 2010-06-14

热门下载

更多