centos6 / centos7 apache geoip install

 o/s : centos 7 / 6  x64

적용 : apache geoip module install

[root@www ~]# yum install GeoIP GeoIP-devel GeoIP-data zlib-devel

[root@www ~]# tar xvfz geoip-api-mod_geoip2-1.2.9.tar.gz

[root@www ~]# cd geoip-api-mod_geoip2-1.2.9

[root@www geoip-api-mod_geoip2-1.2.9]# /usr/local/apache/bin/apxs -i -a -L /usr/lib64 -I /usr/include/ -lGeoIP -c mod_geoip.c

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
———————————————————————-
chmod 755 /usr/local/apache/modules/mod_geoip.so

httpd.conf 에 적용

[root@www geoip-api-mod_geoip2-1.2.9]# vi /usr/local/apache/conf/httpd.conf

LogFormat “%V %h %l %u %t \”%r\” %s %b \”%{Referer}i\” \”%{User-Agent}i\” %{Host}i %{GEOIP_COUNTRY_CODE}e” vcommon

<IfModule geoip_module>
GeoIPEnable On
GeoIPEnableUTF8 On
GeoIPOutput Env
GeoIPDBFile /usr/share/GeoIP/GeoIP.dat
GeoIPDBFile /usr/share/GeoIP/GeoLiteCity.dat
</IfModule>

 access.log 에서 확인

173.245.48.173 – – [24/May/2018:09:19:24 +0900] “GET /wp-content/themes/Blog_Shop/openSrc/font-awesome-4.7.0/fonts/fontawesome-webfont.woff2?v=4.7.0 HTTP/1.1” 301 319 “http://xinet.kr/wp-content/themes/Blog_Shop/openSrc/font-awesome-4.7.0/css/font-awesome.min.css?ver=4.7.0” “Mozilla/5.0 (compatible; Baiduspider-render/2.0; +http://www.baidu.com/search/spider.html)” US
172.69.33.175 – – [24/May/2018:09:19:24 +0900] “GET /wp-content/themes/Blog_Shop/webfont/NanumGothic-Bold.woff2?20991231 HTTP/1.1” 301 292 “http://xinet.kr/wp-content/themes/Blog_Shop/css/webfont-local.css?ver=1” “Mozilla/5.0 (compatible; Baiduspider-render/2.0; +http://www.baidu.com/search/spider.html)” US
172.68.46.103 – – [24/May/2018:09:19:24 +0900] “GET /wp-content/themes/Blog_Shop/webfont/NanumGothic-Regular.woff2?20991231 HTTP/1.1” 301 295 “http://xinet.kr/wp-content/themes/Blog_Shop/css/webfont-local.css?ver=1” “Mozilla/5.0 (compatible; Baiduspider-render/2.0; +http://www.baidu.com/search/spider.html)” US
162.158.59.174 – – [24/May/2018:09:19:25 +0900] “GET /wp-content/themes/Blog_Shop/openSrc/font-awesome-4.7.0/fonts/fontawesome-webfont.woff?v=4.7.0 HTTP/1.1” 301 318 “http://xinet.kr/wp-content/themes/Blog_Shop/openSrc/font-awesome-4.7.0/css/font-awesome.min.css?ver=4.7.0” “Mozilla/5.0 (compatible; Baiduspider-render/2.0; +http://www.baidu.com/search/spider.html)” US


코멘트 쓰기

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

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



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