In the access log file access_log of the httpd service, a large amount of client access information is recorded. By analyzing this information, you can know the access to the WEB site in a timely manner. For experienced administrators, you can write shell scripts to perform on-demand information in the access_log file...
In the access log file access_log of the httpd service, a large amount of client access information is recorded. By analyzing this information, you can know the access to the WEB site in a timely manner.
For experienced administrators, you can write shell scripts to collect on-demand statistics on the information in the access_log file. a simpler method is to use a mature log analysis program, complete Automated log analysis and statistics.
We recommend an open-source log analysis tool awstats.
The following is the process of adding the awstats log analysis page.
1. decompress and release the awstats package, and execute the awstats_configure.pl script in the directory for installation.
After the awstats_configure.pl script is executed, an interactive process is started.
During this process, the awstats installation directory, httpd service configuration file path, log format, and other system environments will be checked. The following procedure is for reference only.
1) select "y" to change the log record format of the httpd service to "combined" to record more details.
2) select "y" to create a new configuration file.
3) define the name of the target website for log analysis (take benet.com as an example)
4) define the storage directory of the awstats configuration file (/etc/awstats by default)
5). add a cron scheduled task (the task cannot be automatically added during script installation. press enter to continue)
6) press enter to exit the installation script
2. modify the awstats. www. benet. conf configuration file.
Find the correct location of the "LogFile" configuration line
[Root @ www tools] # vi/etc/awstats/awstats.www.benet.com. conf
3. create a database storage directory and update the database
Awstats analyzes logs using the awstats. pl script. each operation automatically adds the newly added content to the statistics database.
4. set a cron scheduled task to run the log analysis program periodically.
5. view the analysis report in the web browser
Again we visit the web page: http://www.benet.com/awstats/awstats.pl? Config = www.benet.com to go to the awstats log analysis report page.
This article is from the "Hello" blog