Nginx-0.7.23


#1

Changes with nginx 0.7.23 27 Nov
2008

*) Feature: the "delete" and "ranges" parameters in the "geo" 

directive.

*) Feature: speeding up loading of geo base with large number of 

values.

*) Feature: decrease of memory required for geo base load.

#2

Great!TKS!

2008/11/27 Igor S. removed_email_address@domain.invalid:


#3

When will ngx_http_secure_link_module add “timeout” directive,so the
uri will valid after the “timeout”?


#4

Good job! Thanks!
Can we use geoip City database with this release? Is there any script to
convert the CSV files to a CIDR (nginx-compatible) file?
Thanks again.


#5

On Fri, Nov 28, 2008 at 06:45:16PM +0100, Bobby Dr wrote:

Good job! Thanks!
Can we use geoip City database with this release? Is there any script to
convert the CSV files to a CIDR (nginx-compatible) file?

I’m using this perl script to convert to CIDR format:

#!/usr/bin/perl -w

use Net::CIDR::Lite;
use strict;
use warnings;

while (<>) {

if (/^"([^"]+)","([^"]+)","([^"]+)"/){

    my($start, $end, $region) = ($1, $2, $3);

    my $cidr = Net::CIDR::Lite->new(ip($start) . "-" . ip($end));

    print((join " $region;\n", $cidr->list), " $region;\n");
}

}

sub ip {
my $n = shift;

return (($n >> 24) & 0xff) . "." .
       (($n >> 16) & 0xff) . "." .
        (($n >> 8) & 0xff) . "." .
               ($n & 0xff);

}

You should change the line

  •   print((join " $region;\n", $cidr->list), " $region;\n");
    
  •   print((join " $region;\n", $cidr->list_range), " $region;\n");
    

to use ranges format instead of CIDR.

The ranges can be used as

geo $geo {
ranges;
default 0;
include geoip.conf;
}


#6

Igor S. wrote:

I’m using this perl script to convert to CIDR format:

Wow! That was fast! Thanks for the script.

I am running the 0.6.x stable version. Is the new 0.7.23 geo module
backwards compatible? (i.e. is it safe to replace the old module with
the new one for use with the stable version?)


#7

On Sat, Nov 29, 2008 at 05:51:42AM +0100, Bobby Dr wrote:

Igor S. wrote:

I’m using this perl script to convert to CIDR format:

Wow! That was fast! Thanks for the script.

I am running the 0.6.x stable version. Is the new 0.7.23 geo module
backwards compatible? (i.e. is it safe to replace the old module with
the new one for use with the stable version?)

Yes, it’s backward compatible.


#8

On Sat, Nov 29, 2008 at 12:06:43PM +0300, Igor S. wrote:

Yes, it’s backward compatible.

Sorry, I meant that 0.7 geo module is backward compatible in
configuration.
However, you can not place the module in 0.6 source tree.