apache tuning tip..

ITWeb/서버관리 2009. 1. 5. 13:37

기냥 access_log 쪽 tuning 을 좀 할까 하다.. 어서 본거 몇자 적어 본다.. (나중에 또 까먹지 말도록..)
http://httpd.apache.org/docs/2.0/mod/mod_log_config.html
http://httpd.apache.org/docs/2.0/ko/mod/mod_setenvif.html

AllowOverride 설정은 None 으로 하는걸 추천 합니다.
왜 인지는 문서를 보세요. ㅋ
.htaccess 파일을 매 request 마다 오픈 하게 되면 당연히 퍼포먼스가 안좋겠죠..
그래서 None 으로 설정을 하게 됩니다.

이와 더불어 Options FollowSymLinks 도 사용하세요.
apache 가 symlink 인지 확인 하기 위해서 system call 을 하게 되는 부하를 줄일수 있다고 하내요.

KeepAlive Off
dynamic content 를 요구 하는 web server 설정에는 off 로 하시구요.
static content 를 요구 하는 이미지 server 설정에는 on 으로 하시면 좋습니다.
특성에 맞춰서 잘 사용하시면 당근 좋겠죠.. ;;

Allow from ip range 표현은..
Allow from 196.128 또는 196.128.* : 196.128 로 시작하는 ip 만
Allow from 196.128.0.0 - 196.128.0.255 : 해당 범위 까지만
Allow from 196.128.0.0/196.168.0.255

Allow from 196.128.0.0 196.128.0.1 : space 로 구분 지어서 설정한 ip 만

Allow from 196.128.0.0/24 == 196.128.0.0/255.255.255.0 : netmask 와 연동

암튼.. reference url 은.. http://www.apache.org

아래는 어서 봤는데 원본 링크가 생각이 안난다는..ㅡㅜ; I'm sorry.
all
All hosts are allowed access.

A (partial) domain name
All hosts whose names match or end in this string are allowed access.

A full IP address
The first one to three bytes of an IP address are allowed access, for subnet restriction.

A network/netmask pair
Network a.b.c.d and netmask w.x.y.z are allowed access, to give finer-grained subnet control. For instance, 10.1.0.0/255.255.0.0.

A network CIDR specification
The netmask consists of nnn high-order 1-bits. For instance, 10.1.0.0/16 is the same as 10.1.0.0/255.255.0.0.

: