forked from Hakase/nginx-build
Add GeoIP2, Remove GeoIP.
This commit is contained in:
@@ -4,8 +4,8 @@
|
|||||||
Example Web Server - [https://ssl.hakase.io/](https://ssl.hakase.io/)
|
Example Web Server - [https://ssl.hakase.io/](https://ssl.hakase.io/)
|
||||||
|
|
||||||
## Please install dependency library.
|
## Please install dependency library.
|
||||||
- CentOS / Red Hat - `yum install jemalloc-devel libuuid-devel libatomic libatomic_ops-devel expat-devel unzip autoconf automake libtool gd-devel geoip-devel gcc-c++ curl`
|
- CentOS / Red Hat - `yum install jemalloc-devel libuuid-devel libatomic libatomic_ops-devel expat-devel unzip autoconf automake libtool gd-devel libmaxminddb-dev gcc-c++ curl`
|
||||||
- Ubuntu / Debian - `apt install libjemalloc-dev uuid-dev libatomic1 libatomic-ops-dev expat unzip autoconf automake libtool libgd-dev libgeoip-dev g++ curl`
|
- Ubuntu / Debian - `apt install libjemalloc-dev uuid-dev libatomic1 libatomic-ops-dev expat unzip autoconf automake libtool libgd-dev libmaxminddb-dev g++ curl`
|
||||||
|
|
||||||
## How to Install?
|
## How to Install?
|
||||||
1. Clone this repository - `git clone https://github.com/hakasenyang/nginx-build.git --recursive`
|
1. Clone this repository - `git clone https://github.com/hakasenyang/nginx-build.git --recursive`
|
||||||
@@ -42,6 +42,8 @@ Example Web Server - [https://ssl.hakase.io/](https://ssl.hakase.io/)
|
|||||||
- Strict SNI requires at least two ssl server settings (server { listen 443 ssl }).
|
- Strict SNI requires at least two ssl server settings (server { listen 443 ssl }).
|
||||||
- It does not matter what kind of certificate or duplicate.
|
- It does not matter what kind of certificate or duplicate.
|
||||||
- Use "strict_sni_header on" if you do not want to respond to invalid headers. (only with strict_sni)
|
- Use "strict_sni_header on" if you do not want to respond to invalid headers. (only with strict_sni)
|
||||||
|
- GeoIP2 Module [#2](https://github.com/hakasenyang/nginx-build/issues/2)
|
||||||
|
- [Check the following page](https://github.com/leev/ngx_http_geoip2_module) for GeoIP2 settings method.
|
||||||
|
|
||||||
## Upcoming Features
|
## Upcoming Features
|
||||||
- Auto build (rpm, deb, etc.)
|
- Auto build (rpm, deb, etc.)
|
||||||
@@ -49,3 +51,4 @@ Example Web Server - [https://ssl.hakase.io/](https://ssl.hakase.io/)
|
|||||||
|
|
||||||
## Deprecated Features
|
## Deprecated Features
|
||||||
- SPDY (Not compatible this version.)
|
- SPDY (Not compatible this version.)
|
||||||
|
- GeoIP (Changed to GeoIP2.)
|
||||||
@@ -94,6 +94,7 @@ if [ "$RTMP" = 1 ]; then BUILD_MODULES="${BUILD_MODULES} --add-module=./lib/ngin
|
|||||||
if [ "$NAXSI" = 1 ]; then BUILD_MODULES="${BUILD_MODULES} --add-module=./lib/naxsi/naxsi_src"; fi
|
if [ "$NAXSI" = 1 ]; then BUILD_MODULES="${BUILD_MODULES} --add-module=./lib/naxsi/naxsi_src"; fi
|
||||||
if [ "$DAV_EXT" = 1 ]; then BUILD_MODULES="${BUILD_MODULES} --add-module=./lib/nginx-dav-ext-module"; fi
|
if [ "$DAV_EXT" = 1 ]; then BUILD_MODULES="${BUILD_MODULES} --add-module=./lib/nginx-dav-ext-module"; fi
|
||||||
if [ "$FANCYINDEX" = 1 ]; then BUILD_MODULES="${BUILD_MODULES} --add-module=./lib/ngx-fancyindex"; fi
|
if [ "$FANCYINDEX" = 1 ]; then BUILD_MODULES="${BUILD_MODULES} --add-module=./lib/ngx-fancyindex"; fi
|
||||||
|
if [ "$GEOIP2" = 1 ]; then BUILD_MODULES="${BUILD_MODULES} --add-module=./lib/ngx_http_geoip2_module"; fi
|
||||||
|
|
||||||
auto/configure \
|
auto/configure \
|
||||||
--with-cc-opt="-DTCP_FASTOPEN=23 ${BUILD_BIT}${BUILD_LTO} -g -O3 -march=native -fstack-protector-strong -fuse-ld=gold -fuse-linker-plugin --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wno-strict-aliasing -Wp,-D_FORTIFY_SOURCE=2 -gsplit-dwarf -DNGX_HTTP_HEADERS" \
|
--with-cc-opt="-DTCP_FASTOPEN=23 ${BUILD_BIT}${BUILD_LTO} -g -O3 -march=native -fstack-protector-strong -fuse-ld=gold -fuse-linker-plugin --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wno-strict-aliasing -Wp,-D_FORTIFY_SOURCE=2 -gsplit-dwarf -DNGX_HTTP_HEADERS" \
|
||||||
@@ -122,7 +123,6 @@ auto/configure \
|
|||||||
--with-http_stub_status_module \
|
--with-http_stub_status_module \
|
||||||
--with-http_flv_module \
|
--with-http_flv_module \
|
||||||
--with-http_mp4_module \
|
--with-http_mp4_module \
|
||||||
--with-http_geoip_module \
|
|
||||||
--with-http_gunzip_module \
|
--with-http_gunzip_module \
|
||||||
--with-http_slice_module \
|
--with-http_slice_module \
|
||||||
--with-http_gzip_static_module \
|
--with-http_gzip_static_module \
|
||||||
@@ -142,7 +142,6 @@ auto/configure \
|
|||||||
--with-http_v2_module \
|
--with-http_v2_module \
|
||||||
--with-http_v2_hpack_enc \
|
--with-http_v2_hpack_enc \
|
||||||
--with-stream_ssl_module \
|
--with-stream_ssl_module \
|
||||||
--with-stream_geoip_module \
|
|
||||||
--with-stream_realip_module \
|
--with-stream_realip_module \
|
||||||
--with-stream_ssl_preread_module \
|
--with-stream_ssl_preread_module \
|
||||||
--add-module=./lib/ngx_devel_kit \
|
--add-module=./lib/ngx_devel_kit \
|
||||||
|
|||||||
@@ -44,6 +44,9 @@ DAV_EXT=1
|
|||||||
### fancyindex
|
### fancyindex
|
||||||
FANCYINDEX=1
|
FANCYINDEX=1
|
||||||
|
|
||||||
|
### GEOIP2
|
||||||
|
GEOIP2=1
|
||||||
|
|
||||||
##########################
|
##########################
|
||||||
### nginx install path ###
|
### nginx install path ###
|
||||||
##########################
|
##########################
|
||||||
|
|||||||
Reference in New Issue
Block a user