HTTPD of Linux Services

Source: Internet
Author: User

Customlog "|/usr/local/apache/bin/rotatelogs/var/log/access_log 86400" common

The above may not work properly, so with the following, add the following command in Httpd.conf, and then access the page, the log will be replaced in a minute.

Customlog "| | /usr/local/apache/bin/rotatelogs/var/log/access_log 86400 "Common

[Email protected] httpd]# vi/etc/httpd/conf/httpd.conf
[Email protected] httpd]# service httpd restart
Starting httpd: [OK]

No access within a minute, no rotation. There is a visit, when the time is up for rotation.

[email protected] httpd]# LL
Total 104
-rw-r--r--. 1 root root 1001 Apr 3 17:46 Access_log
-rw-r--r--. 1 root root 950 Apr 3 18:00 access_log.1428055200
-rw-r--r--. 1 root root 950 Apr 3 18:01 access_log.1428055260
-rw-r--r--. 1 root root 2850 Apr 3 18:02 access_log.1428055320
-rw-r--r--. 1 root root 475 Apr 3 18:03 access_log.1428055380

HTTPD of Linux Services

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.