这是我测试onethink用的配置 可以参考一下
server { listen 80; server_name onethink.dev www.onethink.dev; root /vagrant/www/onethink; index index.php; location / { if ( -f $request_filename) { break; } if ( !-e $request_filename) { rewrite ^/(.*)$ /index.php/$1 last; break; } } location ~ \.php { set $script $uri; set $path_info ""; if ($uri ~ "^(.+\.php)(/.+)") { set $script $1; set $path_info $2; } include fastcgi_params; fastcgi_index index.php; fastcgi_pass 127.0.0.1:9000; fastcgi_param PATH_INFO $path_info; fastcgi_param SCRIPT_FILENAME $document_root$script; fastcgi_param SCRIPT_NAME $script; try_files $uri =404; } }