Automatic splitting of Apache logs

Source: Internet
Author: User
Tags apache log
Apache logs are automatically split first in apache httpd. enter 1 LogFormat & quot; % h % l % u % t \ & quot; % r \ & quot; % & gt; s % B \ & quot; in the conf file; % {User-Agent} I \ & quot; k686 NOTE: & lt; IfModulelog_config_module & g
Apache logs are automatically split first in apache httpd. write the following in the conf file: 1 LogFormat "% h % l % u % t \" % r \ "%> s % B \" % {User-Agent} I \ "" k686 note write And Between. then set the following in the virtual host configuration (httpd-vhosts.conf): 1 CustomLog "| bin/rotatelogs.exe logs/% Y-% m-% d-9qc_log.log 30 M" k686 note that two k686 must match, you can also define it as any other name. for simple settings of apache log segmentation, the core configuration is: 1 CustomLog "| bin/rotatelogs.exe logs/% Y-% m-% d-9qc_log.log 30 M" k686 here, the name is based on year-month-day-9qc_log.log. The maximum size is 30 MB. if the value is exceeded, the log file is split ..
Related Article

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.