Apache 2.4.4 Automatically splits logs, which are generated by year, month, and day. apache2.4.4

Source: Internet
Author: User

Apache 2.4.4 Automatically splits logs, which are generated by year, month, and day. apache2.4.4

<VirtualHost *: 80> # It's time. stay Fox DocumentRoot "/www/wwwroot/www.lanmps.com" ServerName www. lanmps. comDirectoryIndex index.html index. php index.htm ErrorLog "/www/wwwLogs/logs" CustomLog "|/www/lanmps/apache/bin/rotatelogs/www/wwwLogs/logs 86400" common <Directory/ www/wwwroot/www.lanmps.com> Options-Indexes AllowOverride All Require all granted </Directory> </VirtualHost>


If the size of the log file is limited to 800 mb and the file size is exceeded, you can set it as follows:

CustomLog "|/www/lanmps/apache/bin/rotatelogs/www/wwwLogs/logs/www.lanmps.com/policy_0000m_0000d.access.log 86400 800 M" common

For details about the apache rotatelogs function, please refer to the http://88fly.blog.163.com/blog/static/122680390201293172154395/

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.