Follow Us on Twitter

Rotate ssl_request_log in ssl.conf

by Ian Hoogeboom on April 16, 2010 · 0 comments

The CustomLog directive is used for the ssl_request_log, but unlike the ErrorLog or TransferLog directive in the httpd.conf or ssl.conf log, the CustomLog takes multiple arguments.

The trick is to use the “|” (pipe) character in only the filename, leaving the second argument untouched. This will result in the rotation.

This is great, because the ssl_request_log in Oracle AS (10.1.2) is not rotated by default, resulting a log of gigabytes after a couple of months.

Without rotation

CustomLog "<filename>" "<parameters>"

CustomLog logs\ssl_request_log "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

Solution Using rotation

CustomLog "|<midtier>\Apache\Apache\bin\rotatelogs <filename> <size>" "<parameters>"

CustomLog "|<midtier>\Apache\Apache\bin\rotatelogs logs\ssl_request_log 43200" "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

Using rotation with alias

To make it a bit more readable, one can use the LogFormat alias:

LogFormat "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" ssl_request_format

CustomLog "|<midtier>\Apache\Apache\bin\rotatelogs logs\ssl_request_log 43200" ssl_request_format

Of course, replace <midtier> with your midtier destination.

More info on the CustomLog directive, see the Apache website.

Ratings:
VN:F [1.9.13_1145]
Rating: 0.0/5 (0 votes cast)

Leave a Comment

 

Previous post:

Next post:

About Whitehorses
Company profile
Services
Technology

Whitehorses website

Home page
Whitebooks
Jobs

Follow us
Blog post RSS
Comment RSS
Twitter