Forum Moderators: phranque
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
<VirtualHost 000.000.00.000:80>
DocumentRoot /var/www/vhosts/zzzzzzz.com/html
ServerName zzzzzzz.com
ServerAlias "www.zzzzzzz.com"
ServerAdmin "webadmin@zzzzzzz.com"
ScriptAlias "/cgi-bin/" "/var/www/vhosts/zzzzzzz.com/cgi-bin/"
CustomLog "/var/www/vhosts/zzzzzzz.com/access_log" "combined"
ErrorLog "/var/www/vhosts/zzzzzzz.com/error_log"
RewriteEngine On
RewriteLogLevel 0
RewriteLog "/var/www/vhosts/zzzzzzz.com/html/logs/rewrite.log"
# format /fp/4/1
RewriteCond %{REQUEST_URI} ^/fp/(.+)/(.+)$
RewriteRule ^/fp/(.+)/(.+) /Frames.php?Type=$1&Use=$2
# format /fdp/4
RewriteCond %{REQUEST_URI} ^/fdp/(.+)$
RewriteRule ^/fdp/(.+) /FrameDetailPage.php?FrameNo=$1
<Directory /var/www/vhosts/zzzzzzz.com/html>
Options Includes FollowSymLinks
AllowOverride All
</Directory>
</VirtualHost>
Instead of writing to access_log, it is written to what should be the rotated file. The file currently being written to is access_log-20141013. The previous rotated file is access-log-20141006.
CustomLog "/var/www/vhosts/zzzzzzz.com/access_log" "combined"
# rotate for logfiles that aren't being written correctly
/var/www/vhosts/zzzzzz.com/*log {
missingok
notifempty
sharedscripts
prerotate
/usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=zzzzzz.com
postrotate
/bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null` 2> /dev/null || true
endscript
}
# rotate for these is fine
/var/log/httpd/*log {
missingok
notifempty
sharedscripts
delaycompress
postrotate
/sbin/service httpd reload > /dev/null 2>/dev/null || true
endscript
}