728x90

1. 윈도우용 awstats를 다운을 받는다

http://awstats.sourceforge.net

2. window용 perl을 다운을 받는다

http://www.activestate.com
http://www.activestate.com/Products/Download/Download.plex?id=ActivePerl

3. 다운받은 perl을 인스톨을 한다.

perl 인스톨이 기본적으로 c:\Perl로 인스톨이 된다

 

4. perl을 인스톨후 awstats를 인스톨한다

awstats는 perl이 설치가 되어 있지 않으면 설치중에 에러 메세지를 띄워주므로 반드시 perl을 설치후 인스톨을 하길 바란다

ex) c:\awstats

설치도중에 dos창으로 아래와 같은 설정 부분이 나온다

----- AWStats awstats_configure 1.0 (build 1.4) (c) Laurent Destailleur -----
This tool will help you to configure AWStats to analyze statistics for
one web server. You can try to use it to let it do all that is possible
in AWStats setup, however following the step by step manual setup
documentation (docs/index.html) is often a better idea. Above all if:
- You are not an administrator user,
- You want to analyze downloaded log files without web server,
- You want to analyze mail or ftp log files instead of web log files,
- You need to analyze load balanced servers log files,
- You want to 'understand' all possible ways to use AWStats...
Read the AWStats documentation (docs/index.html).

-----> Running OS detected: Windows

-----> Check for web server install
awstats_configure did not find your Apache web main runtime.

Please, enter full directory path of your Apache web server or
'none' to skip this step if you don't have local web server or
don't have permission to change its setup.
Example: c:\Program files\apache group\apache
Apache Web server path ('none' to skip):
> none                     ï 아파치웹서버를 쓰질 않으므로 none으로 한다

 

Your web server config file(s) could not be found.
You will need to setup your web server manually to declare AWStats
script-x as a CGI, if you want to build reports dynamically.
See AWStats setup documentation (file docs/index.html)

-----> Update model config file 'C:\awstats\wwwroot\cgi-bin\awstats.model.conf'

File awstats.model.conf updated.

-----> Need to create a new config file ?
Do you want me to build a new AWStats config/profile
file (required if first install) [y/N] ? y     ï처음으로 설치하는것이므로 y로 한다
-----> Define config file name to create
What is the name of your web site or profile analysis ?
Example: www.mysite.com
Example: demo
Your web site, virtual server or profile name:
> smile                     ï 셋팅할 도메인명이나 호스트 명을 입력한다

 

-----> Create config file 'C:\awstats\wwwroot\cgi-bin\awstats.smile.conf'

Config file C:\awstats\wwwroot\cgi-bin\awstats.smile.conf created.

-----> Add update process inside a scheduler

Sorry, for Windows users, if you want to have statistics to be
updated on a regular basis, you have to add the update process
in a scheduler task manually (See AWStats docs/index.html).
Press ENTER to continue...


A SIMPLE config file has been created: C:\awstats\wwwroot\cgi-bin\awstats.smile.conf
You should have a look inside to check and change manually main parameters.
You can then manually update your statistics for 'smile' with command:
> perl awstats.pl -update -config=smile

You can also build static report pages for 'smile' with command:
> perl awstats.pl -output=pagetype -config=smile

 

Press ENTER to finish...

이 도로 awstats 기본설치는 되었다.

5. iis 웹서버 셋팅

 

제어판 ð 관리도구 ð 인터넷 정보서비스 ð 웹사이트

1). 기본 로그를 W3C확장로그 파일형식(Extended W3C log format)으로 설정한다

2). 로그 속성으로 들어가 로그위치를 확인및 변경을 한다

ex) 매월

3). 확장속성을 아래와 같이 변경해 준다

  • 날짜 (date)
  • 시간 (time)
  • 확장속정
    • 클라이언트 ip 주소 (c-ip)
    • 사용자이름 (cs-username)
    • 메서드 (cs-method)
    • URI 스템 (cs-uri-stem)
    • URI 쿼리 (cs-uri-query)
    • 프로토콜 상태 (sc-status)
    • 보낸 바이트 수 (sc-bytes)
    • 프로토콜 버전 (cs-version)
    • 사용자 에이전트 (cs(User-Agent))
    • 참조 페이지 (cs(Referer))

 

6. awstats의 설치된 폴더안의 cgi-bin 디렉토리를 웹페이지가 돌아가는 곳으로 복사를 한다
(cgi-bin 이하의 디렉토리 전부를 복사한다)

ex) C:\awstats\wwwroot\cgi-bin -> c:\www\cgi-bin

 

7. awstats의 icon 디렉토리도 웹서버가 돌아가는 디렉토리로 복사를 한다
(icon 이하의 디렉토리 전부를 복사한다)

ex) C:\awstats\wwwroot\cgi-bin -> c:\www\icon

 

8. 복사된 cgi-bin 디렉토리안의 awstats.host-domain.conf을 iis의 정보와 매치가 될수있도록 수정한다

ex) C:\www\cgi-bin\awstat.smile.conf

(여기서 smile은 리스트4 에서 도메인명이나 호스트명을 입력했던것이다)

LogFile="/var/log/httpd/mylog.log"
ð LogFile="C:\log\W3SVC1\ex0502.log"
// 로그가 기록된 패스및 파일명을 입력한다

LogFormat=1
ð LogFormat=2
// 윈도우 로그포맷은 2이며, Unix및 Linux 계열은 1이다

DirData="."
ð DirData="C:\awstats"
// awstats 로그가 기록될 디렉토리를 지정해주면 된다

 

9. 리스트6에서 복사된 cgi-bin 디렉토리안의 awstats.pl을 perl로 실행을 시켜준다

ex)    C:> cd C:\www\cgi-bin

    C:\www\cgi-bin> perl awstats.pl -config=smile -update

 

10. 웹페이지에서 확인을 해보자

http://yourdomain/cgi-bin/awstats.pl?config=host-domain

ex) http://192.168.0.13/awstats.pl?config=smile

 

11. log 업데이트하기 (매일)

설정 ð 제어판 ð 예약된작업 ð 새로만들기 ð 예약된 작업

 

리스트9를  매일실행할수 있도록 스케줄에 잡아준다

ex) C:\[perl_path]\perl.exe C:\[awstats_path]\awstats.pl -config=mysite –update

적용예) perl C:\www\cgi-bin\awstats.pl -config=smile -update

 

일정을 매일로 잡아주면 매일 정기적으로 awstats의 로그가 업데이트가된다

* 자세한 awstats 웹로그는 인터넷(http://awstats.sourceforge.net) 을 참조하기바란다

원문: http://wonhee.tistory.com/13

' > IIS' 카테고리의 다른 글

Visual LogParser - GUI 로그 파서 도구  (0) 2009.02.23
[Win2K] IIS SMTP 구성  (0) 2008.04.28

+ Recent posts