nginx 0.7.40

Nginx0.7.40新特性
本文介绍了Nginx0.7.40版本中的新特性,包括支持正则表达式中捕获的location指令、带有捕获引用的alias指令、支持正则表达式中捕获的server_name指令等内容。

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;
   }
}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值