Problems with fastcgi php migration
Igor Sysoev
is at rambler-co.ru
Mon Mar 10 20:37:56 MSK 2008
On Mon, Mar 10, 2008 at 01:31:49PM -0400, Ian M. Evans wrote:
> Igor,
>
> Changing the config to:
>
> location / {
> root /usr/local/apache/htdocs;
> index index.shtml index.php;
> }
>
> location ~ \.(shtml|php)$ {
> root /usr/local/apache/htdocs;
> include /usr/local/nginx/conf/fastcgi.conf;
> fastcgi_pass 127.0.0.1:10004;
> }
>
> fixed the problem of not finding the index.shtml or .php files BUT it
> BROKE the passing of the extensionless files like galleries, polls, etc
> to the fastcgi server.
>
> In the current Apache backend, I have a bunch of files directives like:
>
> <Files galleries>
> ForceType application/x-httpd-php
> </Files>
> <Files news>
> ForceType application/x-httpd-php
> </Files>
> <Files poll>
> ForceType application/x-httpd-php
> </Files>
>
> which handle the extensionless php files.
>
> In my nginx.conf, do I need to explicitly state these extensionless PHP
> files (there's 10 of them) in a location directive(s) and have that
> passed to the fastcgi?
Yes,
location /galleries/ {
fastcgi stuff
}
or you may use single regex:
location ^/(galleries|poll|news)/ {
fastcgi stuff
}
--
Igor Sysoev
http://sysoev.ru/en/
More information about the nginx
mailing list