Forum: NGINX nginx-0.7.27

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2008-12-15 12:44
(Received via mailing list)
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 Bochenkov.
1d7e58690643fef4a92750ff39f4c56c?d=identicon&s=25 Kevin Worthington (Guest)
on 2008-12-15 14:57
(Received via mailing list)
Nginx 0.7.27 for Windows is now available: http://cli.gs/n727
--
Kevin Worthington
3eca00a0d3f5725d81723b69621287bd?d=identicon&s=25 Marcos Neves (Guest)
on 2008-12-15 15:12
(Received via mailing list)
Where can I found examples about how to use try_files and variables
support in the "fastcgi_pass" directive?


Marcos Neves
+55 44 3263-8132
+55 44 9918-8488



2008/12/15 Igor Sysoev <is@rambler-co.ru>:
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2008-12-15 15:40
(Received via mailing list)
On Mon, Dec 15, 2008 at 12:04:45PM -0200, Marcos Neves 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
}
3eca00a0d3f5725d81723b69621287bd?d=identicon&s=25 Marcos Neves (Guest)
on 2008-12-15 15:50
(Received via mailing list)
try_files will be very usefu!!
Can it be used outside location context?


Marcos Neves
+55 44 3263-8132
+55 44 9918-8488



2008/12/15 Igor Sysoev <is@rambler-co.ru>:
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2008-12-15 16:05
(Received via mailing list)
On Mon, Dec 15, 2008 at 12:39:57PM -0200, Marcos Neves 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 ?
3eca00a0d3f5725d81723b69621287bd?d=identicon&s=25 Marcos Neves (Guest)
on 2008-12-15 16:14
(Received via mailing list)
I check my conf and found no reason to.
Thanks!

Marcos Neves
+55 44 3263-8132
+55 44 9918-8488



2008/12/15 Igor Sysoev <is@rambler-co.ru>:
This topic is locked and can not be replied to.