질문&답변
클라우드/리눅스에 관한 질문과 답변을 주고 받는 곳입니다.
리눅스 분류

Awstats 웹로그 분석 프로그램 설치 및 설정하기

작성자 정보

  • 궁금이 작성
  • 작성일

컨텐츠 정보

본문

안녕하세요. 홈페이지에 웹 로그 분석프로그램 Awstats  을 설치하고 있습니다.

모든 기본디렉토리가 /usr/local/awstats 로 지정되어있으로 설치를 편하게 하기위해서는 awstats-6.0을 awstats 로
   바꾸는 것이 훨씬 설치하는데 편하게 작용된다.

   [root@soma]# cd /etc
   [root@soma etc]# mkdir awstats
   [root@soma src]# unzip awstats-60.zip
   [root@soma src]# mv awstats-6.0  /usr/local/
   [root@soma src]# cd /usr/local/awstats-6.0
   [root@soma awstats-6.0]# cd tools
   [root@soma awstats-6.0]# perl  configure.pl

   -----> Running OS detected: linux ( 시스템의 OS 가 linux 인 것을 확인함 )
   Do you want to continue setup from this NON standard directory [yN] ? y

   
-----> Check and complete web server config file '/usr/local/apache2/conf/httpd.conf'
   Warning: You Apache config file contains directives to write 'common' log files
   This means that some features can't work (os, browsers and keywords detection).

   Do you want me to setup Apache to write 'combined' log files [y/N] ?
y ( Log Type을 combined으로 변경해야함 )

   주의) 기본적으로 기본 설정에대한 로그타입을 바꾸게 되어있으므로 분석을 받을 도메인이 VirtualHost 로 잡혀있을
            경우 자동으로 바꿔지지 않습니다. 이때는 실행후 나중에 수동으로 변경해줘야합니다.


   -----> 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

   
-----> 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:

   >
www.angelsoma.com


   -----> Create config file '/etc/awstats/awstats.www.atmschool.com.conf'
   Config file /etc/awstats/awstats.www.atmschool.com.conf created.

   -----> Add update process inside a scheduler
   Sorry, configure.pl does not support automatic add to cron yet.
   You can do it manually by adding the following command to your cron:
   /usr/local/awstats-6.0/wwwroot/cgi-bin/awstats -update -config=www.atmschool.com
   Or if you have several config files and prefer having only one command:
   /usr/local/awstats-6.0/tools/awstats_updateall.pl now

   Press ENTER to continue...

 [root@soma]# vi /etc/awstats/awstats.angelsoma.com.conf

   [ 로그파일 위치 정의 ]

   LogFile = "/usr/local/apache/logs/angelsoma.com-access_log"

   [ 통계에대한 업데이트를 쌓을 위치정의 ]

   DirData = "/usr/local/awstats-6.0/data "


4. CGI 실행권한 부여 및 설정

   기본적으로 CGI를 사용할 수 없게끔 되었을 경우 CGI를 실행할 수 있게끔 httpd.conf 파일에서
   몇가지 수정을 해줘야하는 부분이 있습니다.

   # pl 확장자를 cgi 로 인식할 수 있게끔 .pl 추가

   AddHandler  cgi-script  .cgi  
.pl

   # / 파티션에서 cgi를 실행할 수 있게끔 실행권한 부여
   

     Options FollowSymLinks
ExecCGI
     AllowOverride None

   

   # cgi-bin 에대한 ScriptAlias 변경하기

   ScriptAlias  /cgi-bin/  "/usr/local/awstats-6.0/wwwroot/cgi-bin/"
   


5. awstats.pl 파일 권한 변경

    브라우저에서 분석된 결과를 보기위해서는 awstats.pl 파일의 권한을 705 로 변경해줘야합니다.

   [root@soma]# chmod 705  /usr/local/awstats-6.0/wwwroot/cgi-bin/awstats.pl

6. 로그업데이트 시키기

    로그에대한 정보를 자동으로 업데이터 처리를 하지 않으므로 분석정보를 보기전 업데이트를 시켜주
    거나 cron 으로 주기적인 업데이터를 처리해야합니다.

    [root@soma]# /usr/local/awstats-6.0/wwwroot/cgi-bin/awstats.pl -config=www.angelsoma.com

    이 명령어를 실행하면 DirData 디렉토리에 정의된 위치에 분석정보가 쌓이게됩니다.

7. 분석결과 확인하기

   httpd.conf 파일에 weblog.angelsoma.com 이란 VirtualHost를 만들었습니다.
    
   1. DocumentRoot  /usr/local/awstats-6.0/wwwroot 라고 정의함
   2. zone 파일에 weblog 서브도메인 추가

 
   http://weblog.angelsoma.com/cgi-bin/awstats.pl?config=www.angelsoma.com

이렇게 똑같은 방법으로 설치를 했는데. 7번 분석 결과 확인하기에서 이해가 되지 않습니다. 7번 부분 분석결과 확인하기에서 아신 분은 알려주세요.~! zone 파일은 혹시 네임서버를 뜻하는지??

고수님들 부탁드립니다.

 

관련자료

댓글 1

관리자님의 댓글

  • 관리자
  • 작성일
weblog.angelsoma.com << 도메인에서 계속확인할수 있도록 하기위해서 DNS설정에 weblog.angelsoma.com 도메인을 사용할수있도록 설정하는 것입니다.

공지사항


뉴스광장


  • 현재 회원수 :  60,037 명
  • 현재 강좌수 :  35,806 개
  • 현재 접속자 :  113 명