/var/log/httpd/access_log {
    # Append time and date to file
    dateext
    dateformat .%Y_%m_%d-%ss
    size 10M
    rotate 4
    missingok
    notifempty
    sharedscripts
    postrotate
        /bin/kill -HUP `cat /var/run/httpd/httpd.pid 2>/dev/null` 2> /dev/null || true
    endscript
}

/var/log/httpd/error_log {
    # Append time and date to file
    dateext
    dateformat .%Y_%m_%d-%ss
    size 400k
    rotate 4
    missingok
    notifempty
    sharedscripts
    postrotate
        /bin/kill -HUP `cat /var/run/httpd/httpd.pid 2>/dev/null` 2> /dev/null || true
    endscript
}

/var/log/httpd/support-access_log {
    # Append time and date to file
    dateext
    dateformat .%Y_%m_%d-%ss
    size 200k
    rotate 4
    missingok
    notifempty
    sharedscripts
    postrotate
        /bin/kill -HUP `cat /var/run/httpd/httpd.pid 2>/dev/null` 2> /dev/null || true
    endscript
}

/var/log/httpd/support-error_log {
    # Append time and date to file
    dateext
    dateformat .%Y_%m_%d-%ss
    size 100k
    rotate 4
    missingok
    notifempty
    sharedscripts
    postrotate
        /bin/kill -HUP `cat /var/run/httpd/httpd.pid 2>/dev/null` 2> /dev/null || true
    endscript
}

/var/log/httpd/access.log {
    # Append time and date to file
    dateext
    dateformat .%Y_%m_%d-%ss
    size 10M
    rotate 4
    compress
    delaycompress
    notifempty
    create 640 root adm
    sharedscripts
    postrotate
        if invoke-rc.d apache2 status > /dev/null 2>&1; then \
            invoke-rc.d apache2 reload > /dev/null 2>&1; \
        fi;
    endscript
    prerotate
        if [ -d /etc/logrotate.d/httpd-prerotate ]; then \
            run-parts /etc/logrotate.d/httpd-prerotate; \
        fi; \
    endscript

}

/var/log/httpd/error.log {
    # Append time and date to file
    dateext
    dateformat .%Y_%m_%d-%ss
    size 400k
    rotate 4
    missingok
    compress
    delaycompress
    notifempty
    create 640 root adm
    sharedscripts
    postrotate
        if invoke-rc.d apache2 status > /dev/null 2>&1; then \
            invoke-rc.d apache2 reload > /dev/null 2>&1; \
        fi;
    endscript
    prerotate
        if [ -d /etc/logrotate.d/httpd-prerotate ]; then \
            run-parts /etc/logrotate.d/httpd-prerotate; \
        fi; \
    endscript
}

/var/log/httpd/*.log {
    # Append time and date to file
    dateext
    dateformat .%Y_%m_%d-%ss
    size 50k
    rotate 4
    missingok
    compress
    delaycompress
    notifempty
    create 640 root adm
    sharedscripts
    postrotate
        if invoke-rc.d apache2 status > /dev/null 2>&1; then \
            invoke-rc.d apache2 reload > /dev/null 2>&1; \
        fi;
    endscript
    prerotate
        if [ -d /etc/logrotate.d/httpd-prerotate ]; then \
            run-parts /etc/logrotate.d/httpd-prerotate; \
        fi; \
    endscript
