TMA-APACHE-6.4
Ensure Log Storage and Rotation Is Configured Correctly
Mô tả
It is important that there is adequate disk space on the partition that will hold all the log files, and that log rotation is configured to retain at least 3 months or 13 weeks if central logging is not used for storage. Manual review: the benchmark gives no reliable automated check for this control.
Cách kiểm tra
Phương pháp kiểm tra: Xem xét thủ công
Khuyến nghị này không thể kiểm tra tự động. Lần quét sẽ liệt kê mục này kèm hướng dẫn khi bạn truyền cờ --include-manual.
Perform the following steps to determine if the recommended state is implemented: 1. Verify the web log rotation configuration matches the Apache configured log files. 2. Verify the rotation period and number of logs to retain is at least 13 weeks or 3 months. 3. For each virtual host configured with its own log files ensure that those log files are also included in a similar log rotation.
Cách khắc phục
Phương pháp khắc phục: Hướng dẫn hoặc bản vá hạ tầng
To implement the recommended state, do either option 'a' if using the Linux logrotate utility or option 'b' if using a piped logging utility such as the Apache rotatelogs: a) File Logging with Logrotate: 1. Add or modify the web log rotation configuration to match your configured log files in /etc/logrotate.d/httpdor '/etc/logrotate.d/apache2' to be similar to the following. /var/log/httpd/*log { missingok notifempty sharedscripts postrotate /bin/kill -HUP 'cat /var/run/httpd.pid 2>/dev/null' 2> /dev/null || true endscript } 2. Modify the rotation period and number of logs to keep so that at least 13 weeks or 3 months of logs are retained. This may be done as the default value for all logs in /etc/logrotate.conf or in the web specific log rotation configuration in /etc/logrotate.d/httpdto be similar to the following.
Thuộc tính
- Hệ điều hành
- Bất kỳ
- Thẻ
- apachelogging
- Tham chiếu
- CIS Apache HTTP Server 2.4 Benchmark v2.4.0 - 6.4 Ensure Log Storage and Rotation Is Configured Correctly