GeoIP
NGINX Plus에서 지원하는 GeoIP 동적 모듈과 함께 MaxMind GeoIP 데이터베이스를 사용하여 클라이언트 IP 주소의 정보를 변수에 캡처합니다.
Note: MaxMind GeoLite 레거시 데이터베이스는 현재 중단되었으며 대신 MaxMind GeoIP2 또는 Geolite2 데이터베이스와 NGINX Plus GeoIP2 모듈을 사용해야 합니다.
목차
1. 설치 지침
2. 추가 정보
1. 설치 지침
1. GeoIP 모듈 설치
Amazon Linux, CentOS, Oracle Linux 및 RHEL의 경우:
$ yum install nginx-plus-module-geoip
Note: CentOS, Oracle Linux 및 RHEL의 6.x 및 7.x 버전만 지원됩니다.
Debian 및 Ubuntu의 경우:
$ apt-get install nginx-plus-module-geoip
SLES의 경우:
$ zypper install nginx-plus-module-geoip
Alpine의 경우:
$ apk add nginx-plus-module-geoip
2. NGINX Plus 구성 파일인 nginx.conf의 최상위(“main”) context에 load_module 지시문을 넣습니다.
load_module modules/ngx_http_geoip_module.so;
load_module modules/ngx_stream_geoip_module.so;
http {
# ...
}
3. 모듈(HTTP 또는 TCP/UDP)에서 필요에 따라 추가 구성을 수행합니다.
4. 모듈을 활성화하려면 NGINX Plus를 다시 로드하십시오.
$ nginx -t && nginx -s reload
2. 추가 정보
- GeoIP2 Dynamic Module 설치 지침
- Restricting Access by Geographical Location
- ngx_http_geoip_module 모듈 참조
- ngx_stream_geoip_module 모듈 참조
- NGINX Dynamic Modules
- NGINX Plus 기술 사양