Nginx使用AWStats日志分析-創新互聯

AWstats介紹

創新互聯成立于2013年,是專業互聯網技術服務公司,擁有項目成都網站設計、網站建設網站策劃,項目實施與項目整合能力。我們以讓每一個夢想脫穎而出為使命,1280元象山做網站,已為上家服務,為象山各地企業和個人服務,聯系電話:13518219792

Awstats是一個免費非常簡潔而且強大有個性的網站日志分析工具。

它可以統計您站點的如下信息:

一:訪問量,訪問次數,頁面瀏覽量,點擊數,數據流量等

二:精確到每月、每日、每小時的數據

三:訪問者國家

四:訪問者IP

五:Robots/Spiders的統計

六:訪客持續時間

七:對不同Files type 的統計信息

八:Pages-URL的統計

九:訪客操作系統瀏覽器等信息

十:其它信息(搜索關鍵字等等)

環境:

Centos7 操作系統 服務器IP 192.168.30.31。

已經部署好的Nginx服務器我這里使用的是編譯安裝的。

已經做好的DNS正向解析,通過www.aa.com可以正常訪問到該服務器。

部署服務:

安裝AWstats之前確認服務器上Perl環境已經安裝好。

Nginx使用AWStats日志分析

1、解壓并安裝AWstats

[root@lin3031 ~]# tar xf awstats-7.6.tar.gz

[root@lin3031 ~]# mv awstats-7.6 /usr/local/awstats

修改awstats屬主屬組

[root@lin3031 local]# chown root.root -R /usr/local/awstats/

進入tools目錄

[root@lin3031 local]# cd /usr/local/awstats/tools/

2、為www.aa.com站點新建統計配置文件,借助awstats提供的awstats_configure.pl腳本進行創建,

[root@lin3031 tools]# ./awstats_configure.pl

----- AWStats awstats_configure 1.0 (build 20140126) (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: Linux, BSD or Unix

-----> Check for web server install

Enter full config file path of your Web server.

Example: /etc/httpd/httpd.conf

Example: /usr/local/apache2/conf/httpd.conf

Example: c:\Program files\apache group\apache\conf\httpd.conf

Config file path ('none' to skip web server setup):

> none #Nginx輸入none

Your web server config file(s) could not be found.

You will need to setup your web server manually to declare AWStats

script as a CGI, if you want to build reports dynamically.

See AWStats setup documentation (file docs/index.html)

-----> Update model config file '/usr/local/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:

> www.aa.com  #輸入需要統計的域名

-----> Define config file path

In which directory do you plan to store your config file(s) ?

Default: /etc/awstats

Directory path to store config file(s) (Enter for default):

>    #保持默認并回車

-----> Create config file '/etc/awstats/awstats.www.aa.com.conf'

 Config file /etc/awstats/awstats.www.aa.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/wwwroot/cgi-bin/awstats.pl -update -config=www.aa.com

Or if you have several config files and prefer having only one command:

/usr/local/awstats/tools/awstats_updateall.pl now

Press ENTER to continue...  #回車

A SIMPLE config file has been created: /etc/awstats/awstats.www.aa.com.conf

You should have a look inside to check and change manually main parameters.

You can then manually update your statistics for 'www.aa.com' with command:

> perl awstats.pl -update -config=www.aa.com

You can also build static report pages for 'www.aa.com' with command:

> perl awstats.pl -output=pagetype -config=www.aa.com

Press ENTER to finish...  #回車

3、修改www.aa.com統計配置文件

[root@lin3031 ~]# vim /etc/awstats/awstats.www.aa.com.conf

修改nginx日志文件位置

Nginx使用AWStats日志分析

數據目錄,awstats目錄默認不存在需要創建

Nginx使用AWStats日志分析

創建/var/lib/awstats目錄

[root@lin3031 ~]# mkdir -p /var/lib/awstats

4 、更新分析日志文件

[root@lin3031 ~]# /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=www.aa.com

5、生成靜態分析日志網頁數據

[root@lin3031 ~]# /usr/local/awstats/tools/awstats_buildstaticpages.pl -update -config=www.aa.com -lang=cn -dir=/usr/local/awstats/wwwroot -awstatsprog=/usr/local/awstats/wwwroot/cgi-bin/awstats.pl

上述命令解釋如下:

? /usr/local/awstats/tools/awstats_buildstaticpages.pl :awstats靜態頁面生成工具

? -update -config=www.test.com :更新配置域名

? -lang=cn :語言為中文

? dir=/usr/local/awstats/wwwroot :統計結果輸出的目錄

? awstatsprog=/usr/local/awstats/wwwroot/cgi-bin/awstats.pl :日志更新程序的路徑

修改nginx的conf文件使其訪問www.aa.com 和www.aa.com/awstats 互不影響

Nginx使用AWStats日志分析o

效果如下

Nginx使用AWStats日志分析

Nginx使用AWStats日志分析

另外有需要云服務器可以了解下創新互聯cdcxhl.cn,海內外云服務器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務器、裸金屬服務器、高防服務器、香港服務器、美國服務器、虛擬主機、免備案服務器”等云主機租用服務以及企業上云的綜合解決方案,具有“安全穩定、簡單易用、服務可用性高、性價比高”等特點與優勢,專為企業上云打造定制,能夠滿足用戶豐富、多元化的應用場景需求。

標題名稱:Nginx使用AWStats日志分析-創新互聯
分享鏈接:http://m.kartarina.com/article14/cdssde.html

成都網站建設公司_創新互聯,為您提供用戶體驗自適應網站商城網站微信小程序建站公司網站內鏈

廣告

聲明:本網站發布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創新互聯

成都網站建設公司
主站蜘蛛池模板: 亚洲av永久无码精品网站| 伊人无码精品久久一区二区| 日韩精品无码免费专区网站| 亚洲精品无码成人AAA片| 久久久久亚洲av无码专区导航| 无码人妻aⅴ一区二区三区| 亚洲欧洲无码AV电影在线观看| 亚洲熟妇av午夜无码不卡| 亚洲人成无码网WWW| 免费无码中文字幕A级毛片| 亚洲精品无码专区久久久| 无码视频免费一区二三区| 人妻无码第一区二区三区| 久99久无码精品视频免费播放| 蜜臀AV无码精品人妻色欲| av无码国产在线看免费网站| 国产三级无码内射在线看| 久久青青草原亚洲av无码| 国产成人无码午夜视频在线观看| 亚洲乱亚洲乱妇无码| 久久久久久精品无码人妻| 国产成人精品无码免费看| 日韩综合无码一区二区| 成人免费无码视频在线网站 | 在人线av无码免费高潮喷水| 中文成人无码精品久久久不卡| 无码专区HEYZO色欲AV| 亚洲性无码AV中文字幕| 亚洲Av无码一区二区二三区| 亚洲av日韩av无码黑人| 国产成人A人亚洲精品无码| 亚洲午夜国产精品无码| 亚洲va中文字幕无码久久| 中文字幕人妻无码一夲道| 日韩a级无码免费视频| 中文字幕有码无码AV| 亚洲av中文无码乱人伦在线播放| 亚洲精品无码MV在线观看| 亚洲av日韩av高潮潮喷无码| 精品深夜AV无码一区二区| 欧洲精品无码成人久久久|