[CentOS] How to rotate PHP error log - since it belongs to apache
Alexander Farber
alexander.farber at gmail.com
Tue Jun 5 14:19:13 UTC 2012
And also the files I rotate by the
/etc/logrotate.d/httpd
belong to root and not Apache
# ls -al /var/log/httpd/my_vhost_1/
-rw-r--r--. 1 root root 144298773 Jun 5 16:17 access_log
-rw-r--r--. 1 root root 391503903 May 13 03:18 access_log-20120513
-rw-r--r--. 1 root root 369049605 May 20 03:35 access_log-20120520
-rw-r--r--. 1 root root 373837973 May 27 03:18 access_log-20120527
-rw-r--r--. 1 root root 381816772 Jun 3 03:32 access_log-20120603
-rw-r--r--. 1 root root 2854 Jun 5 14:01 error_log
-rw-r--r--. 1 root root 4255 May 13 00:40 error_log-20120513
-rw-r--r--. 1 root root 5580 May 19 20:17 error_log-20120520
-rw-r--r--. 1 root root 6634 May 27 00:17 error_log-20120527
-rw-r--r--. 1 root root 6014 Jun 3 02:46 error_log-20120603
More information about the CentOS
mailing list