'전체 글'에 해당되는 글 1422건

  1. 2006.06.19 웹소스긁는거 막기
  2. 2006.06.19 아파치서버 상태 파악하기...[ mod_status.o 이용 ]

반응형
access.conf


Options None
AllowOverride None

Order allow,deny
allow from all

,

반응형
[ 준비하기 ]

mod_status를 사용하면 관리가자 브라우져를통해 서버를 모니터링할수있게 해준다.
이 기능을 사용하면 간한 웹서버의 분석도가능하다.

이 설정을 Location 지시자를 이용하면 된다.
이 지시자는 특정 URL에대한 다른 지시자의 내용들을 적용할때 사용된다.

기본적으로 이부분은 # 으로 처리가되어있어 활성화가 되어있지 않을것이다.

[ 적용하기 ]

[root@angelsoma]vi /usr/local/apache/conf/httpd.conf

ServerName www.angelsoma.com

DocumentRoot /home/~soma



 SetHandler server-status
 Order deny,allow
 Deny from all
 Allow from .your domain name



[ 설명 ]

SetHandler - 디렉토리에대한 모든 요청을 어떻게 다룰것이지를 결정한다.
Order - 적용순서를 결정한다
      위 예제의 경우는 먼저 deny 를 적용하고 allow 를 적용한다는 의미이며
      결론적으로 allow 만 적용된다는것이다.
Deny from all - 외부로부터의 모든 접근을 막겠다는 의미
Allow from - 이곳에 적용된 경로에서만 서버의 상태를 볼수있게하겠다는 의미이다

만약 VirtualHost 설정이되어있다면 각 Host 마다 적용이 가능하지 않을까 생각한다.

[ 확인하기 ]

브라우져창에서 www.angelsoma.com/server-status 를 입력하면 웹서버의 상태를 확인할수있다.

==========[ 페이지 내용 ]==================================================

Apache Server Status for server

Server Version: Apache/1.3.22 (Unix) PHP/4.0.6
Server Built: Nov 20 2001 18:32:51

Current Time: Wednesday, 28-Nov-2001 13:27:58 KST
Restart Time: Wednesday, 28-Nov-2001 11:31:30 KST
Parent Server Generation: 29  
Server uptime: 1 hour 56 minutes 28 seconds
2 requests currently being processed, 5 idle servers  
_K____W.........................................................
................................................................
................................................................
................................................................

Scoreboard Key:  
"_" Waiting for Connection, "S" Starting up, "R" Reading Request,
"W" Sending Reply, "K" Keepalive (read), "D" DNS Lookup,
"L" Logging, "G" Gracefully finishing, "." Open slot with no current process

PID key:

 19749 in state: _ ,   19750 in state: K ,   19751 in state: _  
 19752 in state: _ ,   19753 in state: _ ,   19754 in state: _  
 19763 in state: W ,



To obtain a full report with current status information you need to use the  
ExtendedStatus On directive.

Apache/1.3.22 Server at server Port 80  

=============================================================================

[ 사용옵션 ]

1.refresh - 매초마다 정보를 자동으로 갱신한다.

http://www.angelsoma.com/server-status?refresh

2.notable - 테이블을 지원하지 못하는 브라우저를 위해 상태정보를 테이블없이 보
          여준다.
http://www.angelsoma.com/server-status?notable

3.refresh=[n/초] - n초보다 자동으로 갱신한다

http://www.angelsoma.com/server-status?refresh=6

http://www.angelsoma.com/server-status?notale,refresh=10  

컴마를 이용하여 여러가지 옵션을 조합할수도 있다.

,