Nginx的URL重写停止通过位置代码

我正在尝试在Nginx上configuration我的Phalcon(php框架)项目。 不幸的是,我无法完成重写工作。 为了更好地理解我的问题,请查看configuration文件:

server { listen 80; ## listen for ipv4; this line is default and implied listen [::]:80 default_server ipv6only=on; ## listen for ipv6 index index.html index.htm index.php; server_name 149.21.165.142; root '/usr/share/nginx/www'; #custom settings for phalcon project: location ^~ /phalcon{ alias '/usr/share/nginx/phalcon/public'; # if file exists return it right away if (-f $request_filename) { break; } # otherwise rewrite it if (!-e $request_filename) { rewrite ^(.+)$ /index.php?_url=$1 last; } location ~ (.*\.php)(/.*)?$ { return 403 "Finally works."; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /usr/share/nginx/phalcon/public$fastcgi_script_name; include fastcgi_params; } } #default project location ~ (.*\.php)(/.*)?$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } location ~ /\.ht { deny all; } } 

http://149.21.165.142/phalcon/很好用,但是在给url添加任何控制器或动作之后: http://149.21.165.142/phalcon/a : http://149.21.165.142/phalcon/a最后No input file specified.

在得到之后: rewrite ^(.+)$ /index.php?_url=$1 last; parsing器停止通过/phalcon位置的代码并跳转到/phalcon #default project注释下的位置。 然后,你可以猜测它没有find任何index.php文件在主根path和服务器返回No input file specified错误。

为什么改写停止通过phalcon位置? 我该如何解决这个问题?

我希望我能够很好地描述这个问题。 英语和Nginx都不是我的优点。