Awstats is an open-source log analysis system developed using the Perl language, which can be used not only to analyze access logs for Apache Web services, but also to analyze samba,vsftpd , log information for services such as IIS
A installing the Awstats package
simply unzip the package to the/usr/local/ directory in the httpd server
tar zXF awstats-7.3
Mvawstats-7.3/usr/local/awstats
A establish a profile for the site to be counted
The Awstats system supports the statistics of log files for multiple Web sites, often using site names to differentiate between sites.
first switch to the Awstat/tools directory and execute the awstats_configure.pl script in it .
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/7E/7C/wKiom1cB-DjyUTAGAAASdOeTghc642.png "style=" float: none; "title=" 1.png "alt=" Wkiom1cb-djyutagaaasdoetghc642.png "/>
It then enters an interactive configuration process.
Specify the path to the httpd master profile and the name of the site to be counted (middle Y and then enter to finish)
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/7E/79/wKioL1cB-OGDO_FKAAA9w-w4Rec097.png "title=" 2.png " Style= "Float:none;" alt= "Wkiol1cb-ogdo_fkaaa9w-w4rec097.png"/>
To modify a site statistics configuration file
vim/etc/awstats/awstats.www.akhack.com.conf
logfile= "/usr/local/httpd/logs/accesss_log" // modify the path to log access logs
dirdata= "/var/lib/awstats" // Specify the Data directory (this directory needs to be created )
mkdir/var/lib/awstats
perform log analysis and set up cron Scheduled Tasks
chmod+x awstats_updateall.pl
. /awstats_updateall.pl Now// Update log statistics for all sites
crontab-e
*/5* * * */usr/local/awstats/tools/awstats_updateall.pl now
servicecrond Start
chkconfig–level Crond on
http://www.akhack.com/awstats/awstats.pl?config=www.akhack.com// Access Analysis System
A Client Address Restrictions
by configuring the item order,the deny from,enable from, can determine client access based on the client's host name and IP address tear.
Order is used to set the throttling sequence
Deny from and allow from to set specific restrictions
Allow,deny: Deny after first permission
Deny,allow: First deny after permission
The configuration is as follows:
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M01/7E/7C/wKiom1cB-lHSrsvoAAAZgosphqs090.png " Title= "1.png" alt= "Wkiom1cb-lhsrsvoaaazgosphqs090.png"/>
A User authorized Access Restrictions
Create a user authentication data file
650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M01/7E/7C/wKiom1cB-nSzexmoAAATiwSagWI951.png " Title= "2.png" alt= "Wkiom1cb-nszexmoaaatiwsagwi951.png"/>
Add User authorization Configuration
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M01/7E/79/wKioL1cB-0Hwn5grAAA55zghTGo027.png " Title= "3.png" alt= "Wkiol1cb-0hwn5graaa55zghtgo027.png"/>
This article is from the "Carey" blog, make sure to keep this source http://akhack.blog.51cto.com/11084669/1760090
Deploy the Awstats Analysis system