Rotate Apache Logs

From support-works
Revision as of 10:46, 24 September 2018 by Pamelal (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

In Supportworks 7.x the Apache logfiles are not archived by default. They can therefore grow to several gigabytes in size and this can then lead to heavy utilization when the server needs to open and update the logfiles. In order to rectify that, the following instructions will automatically rotate the apache logs:

Program Files\Hornbill\Core Services\SwHttpServer\conf\httpd.conf

Edit the httpd.conf file:

CustomLog logs/access.log common
ErrorLog logs/secure_error_log
CustomLog logs/secure_access_log common 
ErrorLog logs/error.log

To

CustomLog "|bin/rotatelogs logs/access-%Y-%m-%d-%H%M.log 50M" common
ErrorLog "|bin/rotatelogs logs/secure_error-%Y-%m-%d-%H%M.log 50M"
CustomLog "|bin/rotatelogs logs/secure_access-%Y-%m-%d-%H%M.log 50M" common
ErrorLog "|bin/rotatelogs logs/error-%Y-%m-%d-%H%M.log 50M"

In order for the changes to be applied, restart the SwHttp server service on the windows services panel.

The Apache logs are rotated automatically in Supportworks v8 and later versions.