Nginx-0.7.27


#1

Changes with nginx 0.7.27 15 Dec
2008

*) Feature: the "try_files" directive.

*) Feature: variables support in the "fastcgi_pass" directive.

*) Feature: now the $geo variable may get an address from a
   variable.
   Thanks to Andrei Nigmatulin.

*) Feature: now a location's modifier may be used without space 

before
name.

*) Feature: the $upstream_response_length variable.

*) Bugfix: now a "add_header" directive does not add an empty value.

*) Bugfix: if zero length static file was requested, then nginx just
   closed connection; the bug had appeared in 0.7.25.

*) Bugfix: a MOVE method could not move file in non-existent 

directory.

*) Bugfix: a segmentation fault occurred in worker process, if no 

one
named location was defined in server, but some one was used in an
error_page directive.
Thanks to Sergey B…


#2

Nginx 0.7.27 for Windows is now available: http://cli.gs/n727

Kevin W.


#3

Where can I found examples about how to use try_files and variables
support in the “fastcgi_pass” directive?

Marcos N.
+55 44 3263-8132
+55 44 9918-8488

2008/12/15 Igor S. removed_email_address@domain.invalid:


#4

On Mon, Dec 15, 2008 at 12:04:45PM -0200, Marcos N. wrote:

Where can I found examples about how to use try_files and variables
support in the “fastcgi_pass” directive?

fastcgi_pass variable usage (just demonstration):

    location \.php$ {
        resolver      127.0.0.1;
        set           $backend   back1:9000;
        fastcgi_pass  $backend;
    }

back1 will be resolved using named server on 127.0.0.1.
You may also describe back1 upstream to disable onfly resolution:

upstream  back1 {
    server   192.168.1.1:9000;
}

server {

    location \.php$ {
        set           $backend   back1;
        fastcgi_pass  $backend;
    }

or just use IP address:

    location \.php$ {
        set           $backend   192.168.1.1:9000;
        fastcgi_pass  $backend;
    }

try_files:

Mongrel:

location / {
try_files /system/maintenance.html
$uri $uri/index.html $uri.html
@mongrel;
}

location @mogrel {
proxy_pass http://mongrel;
}

Drupal/FastCGI:

location / {
try_files $uri @drupal;
}

location ~ .php$ {
try_files $uri @drupal;

fastcgi_param  SCRIPT_FILENAME  /path/to/$uri;
... other fastcgi_param

}

location = @drupal {
fastcgi_pass …;

fastcgi_param  SCRIPT_FILENAME  /path/to/index.php;
fastcgi_param  QUERY_STRING     q=$request_uri;

... other fastcgi_param

}

Joomla/FastCGI:

location / {
try_files $uri @joomla;
}

location ~ .php$ {
try_files $uri @joomla;

fastcgi_param  SCRIPT_FILENAME  /path/to/$uri;
... other fastcgi_param

}

location = @joomla {
fastcgi_pass …;

fastcgi_param  SCRIPT_FILENAME  /path/to/index.php;

... other fastcgi_param

}


#5

On Mon, Dec 15, 2008 at 12:39:57PM -0200, Marcos N. wrote:

try_files will be very usefu!!
Can it be used outside location context?

No, currently it can be use inside location only.
How do you want to use it in server context ?


#6

I check my conf and found no reason to.
Thanks!

Marcos N.
+55 44 3263-8132
+55 44 9918-8488

2008/12/15 Igor S. removed_email_address@domain.invalid:


#7

try_files will be very usefu!!
Can it be used outside location context?

Marcos N.
+55 44 3263-8132
+55 44 9918-8488

2008/12/15 Igor S. removed_email_address@domain.invalid: