Nginx-0.7.40

Changes with nginx 0.7.40 09 Mar
2009

*) Feature: the "location" directive supports captures in regular
   expressions.

*) Feature: an "alias" directive with capture references may be used
   inside a location given by a regular expression with captures.

*) Feature: the "server_name" directive supports captures in regular
   expressions.

*) Workaround: the ngx_http_autoindex_module did not show the 

trailing
slash in directories on XFS filesystem; the issue had appeared in
0.7.15.
Thanks to Dmitry Kuzmenko.

Examples, alias:

location ~ ^/users/(.+\.(?:gif|jpe?g|png))$ {
    alias  /data/w3/images/$1;
}

server_name:

server {
server_name ~^(www.)?(.+)$;

location / {
    root  /sites/$2;
}

}

server {
server_name _; # nonexistent name

location / {
    root  /sites/default;
}

}

Igor, that is awesome. Thanks!

Cheers

Dave

Brilliant feature.

Awesome!

On Mon, Mar 9, 2009 at 8:51 AM, Mathew D.

Nice work!

Thanks a lot.