annotate auto/lib/geoip/conf @ 5885:5a042519bfe7

Upstream: limited next_upstream time and tries when resolving DNS. When got multiple upstream IP addresses using DNS resolving, the number of upstreams tries and the maxinum time spent for these tries were not affected. This patch fixed it.
author Gu Feng <flygoast@126.com>
date Mon, 27 Oct 2014 19:52:03 +0800
parents a74d211f034d
children 85dea406e18f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2985
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
1
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
2 # Copyright (C) Igor Sysoev
4412
d620f497c50f Copyright updated.
Maxim Konovalov <maxim@nginx.com>
parents: 2985
diff changeset
3 # Copyright (C) Nginx, Inc.
2985
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
4
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
5
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
6 ngx_feature="GeoIP library"
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
7 ngx_feature_name=
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
8 ngx_feature_run=no
5014
210b66a6fc7f Configure: fixed GeoIP library detection.
Ruslan Ermilov <ru@nginx.com>
parents: 5013
diff changeset
9 ngx_feature_incs="#include <GeoIP.h>"
2985
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
10 ngx_feature_path=
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
11 ngx_feature_libs="-lGeoIP"
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
12 ngx_feature_test="GeoIP_open(NULL, 0)"
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
13 . auto/feature
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
14
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
15
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
16 if [ $ngx_found = no ]; then
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
17
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
18 # FreeBSD port
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
19
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
20 ngx_feature="GeoIP library in /usr/local/"
5014
210b66a6fc7f Configure: fixed GeoIP library detection.
Ruslan Ermilov <ru@nginx.com>
parents: 5013
diff changeset
21 ngx_feature_path="/usr/local/include"
2985
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
22
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
23 if [ $NGX_RPATH = YES ]; then
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
24 ngx_feature_libs="-R/usr/local/lib -L/usr/local/lib -lGeoIP"
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
25 else
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
26 ngx_feature_libs="-L/usr/local/lib -lGeoIP"
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
27 fi
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
28
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
29 . auto/feature
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
30 fi
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
31
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
32
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
33 if [ $ngx_found = no ]; then
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
34
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
35 # NetBSD port
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
36
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
37 ngx_feature="GeoIP library in /usr/pkg/"
5013
82a3f951feb3 Configure: fixed style of include directories.
Ruslan Ermilov <ru@nginx.com>
parents: 4412
diff changeset
38 ngx_feature_path="/usr/pkg/include"
2985
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
39
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
40 if [ $NGX_RPATH = YES ]; then
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
41 ngx_feature_libs="-R/usr/pkg/lib -L/usr/pkg/lib -lGeoIP"
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
42 else
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
43 ngx_feature_libs="-L/usr/pkg/lib -lGeoIP"
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
44 fi
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
45
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
46 . auto/feature
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
47 fi
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
48
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
49
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
50 if [ $ngx_found = no ]; then
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
51
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
52 # MacPorts
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
53
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
54 ngx_feature="GeoIP library in /opt/local/"
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
55 ngx_feature_path="/opt/local/include"
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
56
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
57 if [ $NGX_RPATH = YES ]; then
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
58 ngx_feature_libs="-R/opt/local/lib -L/opt/local/lib -lGeoIP"
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
59 else
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
60 ngx_feature_libs="-L/opt/local/lib -lGeoIP"
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
61 fi
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
62
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
63 . auto/feature
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
64 fi
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
65
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
66
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
67 if [ $ngx_found = yes ]; then
5014
210b66a6fc7f Configure: fixed GeoIP library detection.
Ruslan Ermilov <ru@nginx.com>
parents: 5013
diff changeset
68
210b66a6fc7f Configure: fixed GeoIP library detection.
Ruslan Ermilov <ru@nginx.com>
parents: 5013
diff changeset
69 CORE_INCS="$CORE_INCS $ngx_feature_path"
2985
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
70 CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
71
5015
a74d211f034d GeoIP: IPv6 support.
Ruslan Ermilov <ru@nginx.com>
parents: 5014
diff changeset
72 if [ $NGX_IPV6 = YES ]; then
a74d211f034d GeoIP: IPv6 support.
Ruslan Ermilov <ru@nginx.com>
parents: 5014
diff changeset
73 ngx_feature="GeoIP IPv6 support"
a74d211f034d GeoIP: IPv6 support.
Ruslan Ermilov <ru@nginx.com>
parents: 5014
diff changeset
74 ngx_feature_name="NGX_HAVE_GEOIP_V6"
a74d211f034d GeoIP: IPv6 support.
Ruslan Ermilov <ru@nginx.com>
parents: 5014
diff changeset
75 ngx_feature_run=no
a74d211f034d GeoIP: IPv6 support.
Ruslan Ermilov <ru@nginx.com>
parents: 5014
diff changeset
76 ngx_feature_incs="#include <stdio.h>
a74d211f034d GeoIP: IPv6 support.
Ruslan Ermilov <ru@nginx.com>
parents: 5014
diff changeset
77 #include <GeoIP.h>"
a74d211f034d GeoIP: IPv6 support.
Ruslan Ermilov <ru@nginx.com>
parents: 5014
diff changeset
78 #ngx_feature_path=
a74d211f034d GeoIP: IPv6 support.
Ruslan Ermilov <ru@nginx.com>
parents: 5014
diff changeset
79 #ngx_feature_libs=
a74d211f034d GeoIP: IPv6 support.
Ruslan Ermilov <ru@nginx.com>
parents: 5014
diff changeset
80 ngx_feature_test="printf(\"%d\", GEOIP_CITY_EDITION_REV0_V6);"
a74d211f034d GeoIP: IPv6 support.
Ruslan Ermilov <ru@nginx.com>
parents: 5014
diff changeset
81 . auto/feature
a74d211f034d GeoIP: IPv6 support.
Ruslan Ermilov <ru@nginx.com>
parents: 5014
diff changeset
82 fi
a74d211f034d GeoIP: IPv6 support.
Ruslan Ermilov <ru@nginx.com>
parents: 5014
diff changeset
83
2985
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
84 else
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
85
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
86 cat << END
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
87
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
88 $0: error: the GeoIP module requires the GeoIP library.
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
89 You can either do not enable the module or install the library.
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
90
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
91 END
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
92
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
93 exit 1
31af2d1a742e ngx_http_geoip_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
94 fi