maxminddb apache module install and how to GeoLite2-Country.mmdb ( mod_maxminddb )

O/S : Centos 7.x
Apache : 2.4.x
maxminddb   module requires Apache 2.2 or 2.4 to be installed
mod_maxminddb   :  https://dev.maxmind.com/geoip/geoip2/downloadable/ –> Apache ( mod_maxminddb)
기존 apache에서 mod_geoip 대신 mod_maxminddb 를 사용하여 access 로그에 국가코드 및 가상호스트에 국가별 접속 설정

1. 사전에 bootstrap을 정상적으로 진행하기 위해서 autoconf automake libtool 설치
libmaxminddb install   (  maxminddb 를 설치하기 위해서 사전에 libmaxminddb 를 설치해야 한다 )

2. environment  /usr/local/lib ld config add ( 라이브러리 추가)

3. ldconfig  /  library reconnition  ( 라이브러리 인식 )

4. maxminddb download and install  apxs=apache apxs path  ( maxminddb 다운로드 및 설치 apache apxs 경로 지정  )

5. apache module maxminddb.so Confim  ( 정상적으로 설치되어 있는지 확인 )

6. httpd.conf file modify ( httpd.conf 에 적용하여 log에 CODE가 찍히게 구성)

GeoLite2-City.mmdb , GeoLite2-Country.mmdb  file download

geoipupdate 4.1.5 install ( Centos 7 ) / GeoLite2-ASN.mmdb GeoLite2-City.mmdb GeoLite2-Country.mmdb
https://xinet.kr/?p=2736

https://www.maxmind.com/en/geoip2-services-and-databases  login -> download Files -> gzip -> tar gzip -> mmdb file

7. apache access_log Country_CODE check ( Apache web log access_log  CODE 확인)

8. KR Contry Olny Allow And Order Contry Block  ( KR 국가만 허용 / 나머지 국가 차단 )

8. KR , US , FR Contry Allow And Order Contry Block  ( KR, US, FR  국가만 허용 / 나머지 국가 차단 )

9. CN Contry Olny Block And Order Contry Allow   ( CN  국가만 차단 / 나머지 국가 허용 )

10. CN,EU only Block And Order Contry Allow ( CN, EU 국가만 차단 / 나머지 국가 허용)

11. VirtualHost  mmdb Access

참고사이트

GeoIP2 Downloadable Databases


https://github.com/maxmind/libmaxminddb/blob/master/README.md

 

 


코멘트 쓰기

이메일은 공개되지 않습니다. 필수 입력창은 * 로 표시되어 있습니다.

다음의 HTML 태그와 속성을 사용할 수 있습니다:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>



배송정보
배송조회를 하시려면 송장번호를 클릭하세요
배송조회
상품명
주문번호
택배사
송장번호