ForceType directive in nginx fastcgi?
Igor Sysoev
is at rambler-co.ru
Thu Feb 22 21:20:10 MSK 2007
On Thu, Feb 22, 2007 at 06:09:47PM +0000, Paul wrote:
> > What PHP script should handle /search/nginx URL ?
>
> /search.php
>
> It uses PATH_INFO or REQUEST_URI
The REQUEST_URI is set in fastcgi_params:
fastcgi_param REQUEST_URI $request_uri;
So you need something like:
location /search {
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME /root/path/search.php;
include fastcgi_params;
}
Setting PATH_INFO is more complicated.
So you need something like:
location /search {
set $path_info "";
if ($uri ~ "^/search(.+)") {
set $path_info $1;
}
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME /root/path/search.php;
fastcgi_param PATH_INFO $path_info;
include fastcgi_params;
}
--
Igor Sysoev
http://sysoev.ru/en/
More information about the nginx
mailing list