How can I rotate access_log file in IHS server
Penchala suman (46●14●25)
| asked Feb 07 '18, 8:19 a.m.
edited Feb 07 '18, 8:31 a.m. by Fariz Saracevic (919●6●13) I’m trying to rotate access_log file in IHS server (httpd.conf) and it is not working.
I’m using below syntax (IHS server is in Linux).
<o:p> </o:p> CustomLog "/opt/IBM/HTTPServer/bin/rotatelogs /opt/IBM/HTTPServer/logs/access_log 86400" common <o:p> </o:p> Error message: [error] (2)No such file or directory: could not open transfer log file /opt/IBM/HTTPServer/bin/rotatelogs /opt/IBM/HTTPServer/logs/access_log 86400. Unable to open logs <o:p> </o:p> Note: I’ve full control to log directory and I’m as root. Can anyone help? <o:p> </o:p> |
Accepted answer
What I would check: do both /opt/IBM/HTTPServer/bin/rotatelogs and /opt/IBM/HTTPSever/logs/access_log exist and is the rotatelogs executable.
Penchala suman selected this answer as the correct answer
|
One other answer
Thanks Kevin,
The below command worked for me.
CustomLog "|/opt/IBM/HTTPServer/bin/rotatelogs /opt/IBM/HTTPServer/logs/access.log.%Y-%m-%d-%H_%M_%S 86400" common
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.