If don't set SCRIPT_NAME, urls like /build/meta/6?num_builds=10&key=phpcs-warnings will be routed to wrong controller & action, and return a html page but not json. It happened in my CentOS 6 server and I found without SCRIPT_NAME index.php \b8\Http\Request::getRequestPath will return wrong path.

XiongLiding 2015-04-26 00:40:10 +08:00
commit f01dd18edd

@ -19,6 +19,7 @@ server {
fastcgi_buffers 256 4k;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root/index.php;
fastcgi_param SCRIPT_NAME index.php;
}
}
```