웹마스터 팁

간단팁 서버 Info!

2002.06.21 00:49

임현

간단히 서버상태를 알아볼수있는 아파치의 기능 server-info 를 봅시다^^

1. 쉘에서 다음과 같이 입력

# vi /usr/local/apache/conf/httpd.conf

(prefix 경로가 다른분은 알아서 수정하시길^^)

그리고 vi 의 검색기능인 "/" 를 이용하여 다음부분을 찾습니다..
(검색어는 server-info)

#
# Allow remote server configuration reports, with the URL of
# http://servername/server-info (requires that mod_info.c be loaded).
# Change the ".your-domain.com" to match your domain to enable.
#
<Location /server-info>
    SetHandler server-info
    Order deny,allow
    Deny from all
    Allow from 111.111.111.111 (이부분을 없애면 localhost 이외의 모든호스트가 요청할수없음)
</Location>

그러면 다음과 같은 부분이 나옵니다. 원래 주석처리(맨앞에 # 을 붙임)되어잇지만, 주석을 풀어주시구요
Allow from 에 고정아이피면 자신의 아이피주소(다른사람의 해킹 및, 서버정보를 알아가는걸 방지하기
위해서) 유동아이피면, Allow from 을 지워줍니다. 그럼 Deny from all 에 의해 서버측에서 실행하는
serverinfo 이외에는 정보를 주지않습니다(단 서버에서 linx 브라우져나,x-window 를 지원해야 볼수있겠죠?)

그럼 세팅을 마치구요

하나더세팅합시다^^ server-info 바로 위에보면 server-status 가있습니다..
역시 같은 방법으로 수정합니다..

#
# Allow server status reports, with the URL of http://servername/server-status
# Change the ".your-domain.com" to match your domain to enable.
#
<Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from 111.111.111.111 (이부분을 없애면 localhost 이외의 모든호스트가 요청할수없음)
</Location>

그럼 다 수정한후에

데몬을 restart(재시작) 시킵니다

다음과 같이 입력합니다.

# /usr/local/apache/bin/apachectl restart

(경로는 알아서 수정^^)

그럼 재시작이 되었죠? 그럼 브라우져에서 다음과 같이 입력합니다

http://아이피주소/server-info
http://아이피주소/server-status

Ex) 대충 이런식으로 나온답니다^^

Apache Server Status for 도메인네임
Server Version: Apache/1.3.23 (Unix) PHP/4.1.0
Server Built: May 2 2002 11:06:09
Current Time: Friday, 21-Jun-2002 00:51:23 KST
Restart Time: Friday, 21-Jun-2002 00:50:56 KST
Parent Server Generation: 2 ................

이상 간단한 팁이었습니다 잘 안되는건 http://www.mcing.com 에 들어오셔서 리눅스 메뉴를 클릭해주세요^^
(홈페이지 홍보 안되나요--?)