Because of the needs of the project, so these days on the use of Awstats to do some research, so this experience to share to everyone, hope can give you a glimmer of help, there are omissions in the place, pleading, thank you.
First explain the purpose and characteristics of Awstats, Awstats is an open source Perl-based Web statistics tool.
It can count the site's information mainly:
One, traffic, number of visits, page views, clicks, data traffic, etc.
Second, accurate to monthly, daily, hourly data
Third, the visitor country
Iv. Visitor IP
V. Statistics of Robots/spiders
Vi. duration of Visitors
Vii. statistical information on different files type
Viii. Statistics of Pages-url
Nine, guest operating system browser and other information
X. Other information (search keywords, etc.)
To get to the point, use the Awstats configuration method. The environment here is Linux (Red Hat) and TOMCAT7
Download AWStats http://sourceforge.net/projects/awstats/files/AWStats/7.3/awstats-7.3.tar.gz/download
Place the file in any directory on Linux for example:/opt
Extracting Files TAR–ZXVF awstats-7.3.tar.gz
Locate the Tomcat directory, modify the Conf/web.xml configuration file, and uncomment the CGI servlet and mapping
<servlet> <Servlet-name>Cgi</Servlet-name> <Servlet-class>Org.apache.catalina.servlets.CGIServlet</Servlet-class> <Init-param> <Param-name>Debug</Param-name> <Param-value>0</Param-value> </Init-param> <Init-param> <Param-name>Cgipathprefix</Param-name> <Param-value>web-inf/cgi</Param-value> </Init-param> <Init-param> <Param-name>Passshellenvironment</Param-name> <Param-value>True</Param-value> </Init-param> <Load-on-startup>5</Load-on-startup></servlet> <servlet-mapping> <Servlet-name>Cgi</Servlet-name> <Url-pattern>/cgi-bin/*</Url-pattern></servlet-mapping>
Modify the <tomcat_home>\conf\context.xml configuration file to add the privileged property on the context
<privileged= "true"><!-- other parts -- </ Context >
Create the Awstats directory and the corresponding Web-inf directory under webapps/
Copy the Css,icon,js directory under the Wwwroot directory of the extracted Awstats directory to the Webapps/awstats directory of Tomcat
Will unzip the Awstats directory under the Wwwroot/cgi-bin so file copy to the Tomcat webapps/awstats/web-inf/cgi directory
Rename the Tomcat directory webapps/awstats/cgi/awstats.model.conf to awstats.< name-related information for your own domain >.conf
Modify the name of the awstats.< own domain related information >.conf file related configuration
#对应日志文件所在位置LogFile = "<your own tomcat.Path>/logs/localhost_access_log.%yyyy-%mm-%dd.txt "#站点域名SiteDomain ="<your own site domain name>"#图标所在目录DirIcons =": /icon "#国际化所使用的语言, default to" auto "Lang=" cn "#国际化文件所在目录DirLang ="./lang "#在生成页面头部所要加入的HTMLHTMLHeadSection ="<DivID= "header">Head Example</Div>"#在生成页面尾部索要加入的HTMLHTMLEndSection ="<DivAlign= ' Right '>@company</Div>"#生成页面所使用的样式表, Awstas provides a default style sheet that allows you to customize the Awstats style stylesheet=". /css/awstats_default.css "
Modifying the Conf/server.xml of the Tomcat directory
<className= "Org.apache.catalina.valves.AccessLogValve"directory = "Logs" prefix= "Localhost_access_log." suffix = ". txt" pattern = "Combined" Filedateformat = "Yyyy-mm-dd" resolvehosts = "false" />
Execute in the directory under tomcat7/webapps/awstats/web-inf/cgi./awstats.pl-update-config=localhost
Access URL View generated log page:http://< set access Ip>:<tomcat port >/awstats/cgi-bin/awstats.pl?config=< own Domain Information >
Page effect:
Description: Prior to the visit to execute the awstats.pl instructions, you can set the Linux as a timed task, easy to query.
The use of Windows is similar, I hope you can communicate together, progress together.
"Original" uses Awstats statistics to deploy Web site data in Tomcat