nginx GeoIP Module download geoip https://dev.maxmind.com/geoip/legacy/downloadable/ un archive and install tar zxf GeoIP.tar.gz cd GeoIP ./configure make make install generate configure echo '/usr/local/lib' > /etc/ld.so.conf.d/geoip.conf ldconfig download Databases curl -O http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz curl -O http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz gzip -d GeoIP.dat.gz mv GeoIP.dat /server/geoip gzip -d GeoLiteCity.dat.gz mv GeoLiteCity.dat /server/geoip nginx compile add options ... --with-http_geoip_module variables $geoip_city_country_code : KR, US 등의 국가 코드 $geoip_city_country_code3 : KOR, USA 등의 세글자 국가 코드 $geoip_city_country_name : KOREA, United State 등의 전체 국가명 $geoip_region : 지방명 $geoip_city : Seoul 등의 도시명 $geoip_postal_code : 우편번호 $geoip_city_continent_code : 대륙 코드 $geoip_latitude : 위도 $geoip_longitude : 경도