Rotate Apache Logs: Difference between revisions

From support-works
Jump to navigation Jump to search
(Created page with "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 ...")
 
No edit summary
 
Line 20: Line 20:
ErrorLog "|bin/rotatelogs logs/error-%Y-%m-%d-%H%M.log 50M"
ErrorLog "|bin/rotatelogs logs/error-%Y-%m-%d-%H%M.log 50M"
</pre>
</pre>
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.
The Apache logs are rotated automatically in Supportworks v8 and later versions.

Latest revision as of 10:46, 24 September 2018

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.