Deploying Rotatelogs Log segmentation and Awstats log analysis in Apache

Source: Internet
Author: User

Overview:
Rotatelogs Log Segmentation: Apache uses its own log split module Rotatelogs split log, Rotatelogs is the Apache in the pipeline log program.
Awstats Log Analysis: is an open-source log analysis system that can be used to analyze Apache Web server access logs, can also be used to analyze Samba, Vsftpd, IIS and other services log information. Combined with Crond and other scheduled task services, the growing log content can be analyzed on a regular basis.
Experimental steps:
(i). Rotatelogs Log Segmentation
1.vim Edit/etc/httpd/conf/httpd.conf configuration file, modify listening address and domain name. Start the httpd service



2. Switch to the/etc/httpd/conf.d/directory to create the vlogs.conf file and edit it


3. Create the log file location (logs) and the Site Directory (htdocs), switch to the/usr/local/apache/htdocs/directory, and write this is logs on the home page of the website.

4. Turn off firewall and enhanced security features, open Browser input 192.168.100.100 for verification


5. View the log split file location

6. Edit the date of the virtual machine, restart the httpd service, revisit the Web page, and view the split file.


(b). Awstats Log Analysis
1. Building DNS domain name resolution

2. Edit the Master profile/named.conf modify the listening address and set all network segments to be resolved

3. Edit the Zone profile/named.rfc1912.zones

4. Edit the Zone data profile to add the resolved IP address.


5. Turn on the named service for resolution.

6. Unzip the AWSTATS-7.6.TAR.GZ installation package

7. Move the installation package into the/use/local directory and create a new file name to execute the./awstats_configure.pl. For editing



8. View the contents of the file in the Apache Master profile/httpd/conf/httpd.conf

9. Switch to the/etc/awstats/directory, Edit the awstats.www.benet.com.conf file to modify the logfile log path, set the actual location of the Web log file, and Dirdata specify the data directory, which can take the default value, but need to create the specified directory (/var/lib/awstats).



10. Restart the HTTPD service to open the browser for login verification (http://www.benet.com/awstats/awstats.pl?config=www.benet.com)


11. Turn on data updates and scheduled tasks to update data

12. Set the scheduled task Crontab-e to start the Crond service.


13. Optimize Web pages


14. Restart the HTTPD service and open the browser input http://www.benet.com/awb.html for access verification.

Deploying Rotatelogs Log segmentation and Awstats log analysis in Apache

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.