Issues renaming the Secure Proxy Server access log
search cancel

Issues renaming the Secure Proxy Server access log

book

Article ID: 38542

calendar_today

Updated On:

Products

CA Single Sign On Secure Proxy Server (SiteMinder) CA Single Sign On SOA Security Manager (SiteMinder) CA Single Sign-On

Issue/Introduction

Symptom:

We are trying to rename Secure Proxy server current access log to following format: accesslog.log, it was achieved by updating httpd.conf but an additional number is getting added to the filename like (accesslog.log.1448841600).

We need to remove .1448841600 extension from the current log. 

httpd.conf update: 
CustomLog "|'/opt/CA/secure-proxy/httpd/bin/rotatelogs' '/opt/CA/secure-proxy/httpd/logs/accesslog.log' 86400" combined env=!forwarded 
CustomLog "|'/opt/CA/secure-proxy/httpd/bin/rotatelogs' '/opt/CA/secure-proxy/httpd/logs/accesslog%Y%m%d.log' 86400" proxy env=forwarded 

Instructions
:

In this particular case, Apache is appending the Unix epoch time to the end of the log. This is an Apache configuration issue, so we recommend taking a look at the Apache 'rotatelog' documentation to make sure that you are passing the right arguments to it, to get the file format that you need.

Double check the syntax and make sure that it's using the strftime(3) function to convert the epoch into a string, since that is most likely not happening. See the documentation linked below in the “Additional Information” section of this article.

In order to correct the problem, you must ensure that you have the date/time entered as a format string, in accordance with the following item in the Apache documentation:

"If logfile includes any '%' characters, it is treated as a format string for strftime(3). Otherwise, the suffix .nnnnnnnnnn is automatically added and is the time in seconds (unless the -t option is used)."

Example CustomLog:

CustomLog "|'/opt/CA/secure-proxy/httpd/bin/rotatelogs' '/opt/CA/secure-proxy/httpd/logs/accesslog%Y%m%d.log' 86400"

Additional Information:

https://httpd.apache.org/docs/2.4/programs/rotatelogs.html

Environment

Release: ESPSTM99000-12.51-Single Sign On-Extended Support Plus
Component: