7 messages in ru.sysoev.nginxRe: ForceType directive in nginx fast...
FromSent OnAttachments
PaulFeb 22, 2007 8:22 am 
Igor SysoevFeb 22, 2007 9:37 am 
PaulFeb 22, 2007 9:56 am 
Igor SysoevFeb 22, 2007 10:03 am 
PaulFeb 22, 2007 10:09 am 
Igor SysoevFeb 22, 2007 10:19 am 
PaulFeb 22, 2007 10:35 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: ForceType directive in nginx fastcgi?Actions...
From:Igor Sysoev (is-G@public.gmane.org)
Date:Feb 22, 2007 9:37:20 am
List:ru.sysoev.nginx

On Thu, Feb 22, 2007 at 04:22:25PM +0000, Paul wrote:

I'm wondering how to make certain files with no file extensions execute as PHP files.

In Apache, this is what I use:

<Location /search> ForceType application/x-httpd-php </Location>

In Lighttpd, this is what I use:

fastcgi.map-extensions = ( "/search" => ".php" ) fastcgi.server = ( ".php" => ( "localhost" => ( "socket" => "/tmp/php-fastcgi.socket", ...

I'm trying not to use rewrites because URLs like http://host/search/a&b becomes http://host/search.php?a&b with:

location ~ ^/search { root /root/path; rewrite ^/search?(.*)$ /search.php?$1 break; }

Using location /search/ { fastcgi_pass 127.0.0.1:9000; fastcgi_param SCRIPT_FILENAME /root/path/search.php; include fastcgi_params; }

You should use

location /search { fastcgi_pass 127.0.0.1:9000; # fastcgi_pass /tmp/php-fastcgi.socket;

fastcgi_param SCRIPT_FILENAME /root/path$fastcgi_script_name; include fastcgi_params; }

drops the input parameter. I'm thinking I need to alter fastcgi_param QUERY_STRING $query_string; ?

fastcgi_param QUERY_STRING $query_string;

is already in the fastcgi_params file.