admin 2010.12.30 mod_rewrite 를 이용한 www 접속 웹주소창에 xinet.kr 입력시 주소창 주소가 www.xinet.kr 표시시 아래와 같이 mod_rewrite 를 설정<VirtualHost 10.10.10.1:80> DocumentRoot /home/xinet/html ServerName xinet.kr RedirectMatch /(.*)$ http://www.xinet.kr/$1 CustomLog logs/access_log vcommon</VirtualHost> <VirtualHost 10.10.10.1:80> DocumentRoot /home/xinet/html ServerName www.xinet.kr CustomLog logs/access_log vcommon</VirtualHost>주소창이 아닌 소스상에서... Read More..
admin 2010.11.19 BOT 아이피리스트 (검색 bot 아이피) http://iplists.com/http://iplists.com/google.txthttp://iplists.com/inktomi.txthttp://iplists.com/lycos.txthttp://iplists.com/infoseek.txthttp://iplists.com/altavista.txthttp://iplists.com/excite.txthttp://iplists.com/misc.txthttp://iplists.com/non_engines.txt Read More..
admin 2010.11.19 검색 로봇 막기 (검색 bot 막기) robots.txt 사용하려면 홈페이지 최고 상단 / 에 올려놓으시면됩니다. 참고로 robots.txt 있다고 해서 모든 로봇을 막을수는 없습니다. 그냥 뚤고 지나가는 로봇도 있습니다. * 아래와 같이 설정하시면 모든 검색엔진에 대해서 막는다는 뜻입니다. robots.txt ———————- User-agent: * Disallow: / ———————- 모든 검색엔진 허용하기 ——————— User-agent: * Disallow: ——————- 특정 검색엔진 막기 아래와 같이 특정 검색 로봇 이름명을 적어주시면됩니다. //네이버 로봇 막기 ——————— User-agent: cowbot Disallow: / ——————- //구글 로봇 막기 ——————– User-agent: Googlebot Disa... Read More..
admin 2010.11.16 [alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of [Tue Nov 16 15:23:08 2010] [alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of “ns1.xinet.kr”[Tue Nov 16 15:25:15 2010] [alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of “ns1.xinet.kr”Configuration Failed이런 에러가 발생되는 경우가 있다이럴때는 호스트네임을 찾을수가 없어서 발생되는 부분이되네임서버를 확인하고 네임서버에도 이상이 없을경우 hostname 을 지정해 준다또는 vi /etc/hosts 파일에 해당 서버의 네임... Read More..
admin 2010.11.05 bash에서 배열 사용 #! /bin/bashFILE=”[aeiou]”declare -a ARRAYCOUNT=$( grep “$FILE” /var/log/httpd/access_log |wc -l )ARRAY=( “$COUNT” )echo “count of array elements: ${#ARRAY[@]}”echo ” list of array elements: ${ARRAY[@]}”ls /var/log/httpd/access_log.[0-9].gz |{while read LOG ; doCOUNT=$( gzcat “$LOG” |grep “$FILE” |wc -l )ARRAY=( ${ARRAY[@]} “$COUNT” )echo “count of array elements: ${#ARRAY[@]}”echo ” list of array... Read More..
admin 2010.10.01 서비스 제한측면의 아파치 활용 예제 아파치 웹서버의 활용에 있어, 보다나은 보안 설정 방법 몇 가지를 소개한다.특정 Agent가 자꾸 사이트에 들어와서 긁어간다든지,이미지 파일을 외부에서 링크하지 못하도록 한다든지,특정 IP에서는 인증없이, 그 이외 IP에서는 아파치 인증을 통해서만 페이지를 보게하는등의 응용적인 측면에서 방법들이다.이 방법들은 제가 사용하고 있는 몇가지 방법을 정리하는 의미에서 적은 것이다.1. 특정 브라우저의 접속을 차단 SetEnvIfNoCase User-Agent “^Microsoft URL Control” dont_want<Directory /usr/local/apache/htdocs> <Limit GET POST>Order Allow,DenyAllow from allDeny from env=dont_want... Read More..
admin 2010.09.29 mysql unauthenticated user login mysql> show processlist;+—-+———————-+———————-+——-+———+——+——————+——————+| Id | User | Host | db | Command | Time | State | Info |+—-+———————-+———————-+——-+———+——+——————+——————+| 4 | unauthenticated user | 218.145.71.224:50060 | NULL | Connect | NULL | Reading from net | NULL | | 5 | unauthenticated user | 218.145.71.224:50061 ... Read More..
admin 2010.09.27 configure: error: pixman >= 0.10.0 is required cairo 설치시 configure: error: pixman >= 0.10.0 is required 메세지가 나타나면pixman 을 설치해 준다 centos 4.x 에서는 컴파일 해줘야 하며 centos5.x 에서는 그냥 yum으로 설치해주면된다 [root@mrtg cairo-1.6.4]# export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig [root@mrtg cairo-1.6.4]# ./configure Read More..
admin 2010.08.25 nginx + php (fastCGI) 설치 nginx + php (fastCGI) 설치 환경 : centos 5.x (32bit) 우리가 사용하는 서버의 대 다수는 아파치 웹서버가 주로 사용하고 있다 이미지 전용서버를 찾던 중 nginx를 알게되어 실제 어느정도 퍼포먼스가 나오는지알고 싶어 설치 및 테스트를 해 보았으나그렇게 체감속도가 빠른것은 아니였으나 이미지로딩이나 cpu부하는 전반적으로apache 서버보다 더 성능이 우수하게 나왔다 그럼 설치에 앞서 구성을 살펴보면 nginx + php + memcache + eaccelerator + ImageMagick + imagick 자료 다운로드 [root@xinet ~]# wget http://sysoev.ru/nginx/nginx-0.8.46.tar.gz[root@xinet ~]# wget htt... Read More..
admin 2010.08.10 아파치 GeoIP를 이용한 국가별 제한 아파치 1.3 버전 GEOIP를 이용한 해외망 아파치 차단 (하단 apache2.x 적용) GeoIP데이터를 apache에서 사용하기위해서는 mod_geoip를 설치하기에 앞서 GeoIP C API를 먼저 설치하여야 한다 하지만 O/S 버전이 CENTOS 4. 이상 YUM 서비스를 지원한다면 YUM으로 설치할수 있다 [root@ns1 ~]# yum -y install GeoIP GeoIP-devel GeoIP-data perl-Geo-IP YUM 서비스 지원되지 않는 운용체제에서는 아래와 같이 컴파일 작업을 진행한다 ㅋ 다운로드 : http://www.maxmind.com/app/c [root@ns1 ~]#wget http://geolite.maxmind.com/download/geoip/api/c/GeoI... Read More..