Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How can I rotate my access.log file using httpd.conf on IHS?

I'm trying to rotate my access.log file on my IHS server which has grown to 5GB+ lately. Problem is no matter what syntax I use in httpd.conf it just doesn't work. For testing purposes, I tried to rotate it every 60 seconds in the following three examples:

Example #1:

CustomLog "|\"C:/Program Files/IBM/HTTPServer/bin/rotatelogs.exe\" \"C:/Program Files/IBM/HTTPServer/logs/access.log\" 60" common

Example #2:

CustomLog "|\”C:/Program Files/IBM/HTTPServer/bin/rotatelogs.exe\” logs/access.log 60" common

Example #3:

CustomLog "|C:/Program\ Files/IBM/HTTPServer/bin/rotatelogs.exe logs/access.log 60" common

As far as I can tell the syntax appears correct as I can see that rotatelogs.exe script (two even) started in task manager.  There are no errors reported in the error.log file when I start the HTTP server.

I'm doing this in Windows 2008 R2 where I have WebSphere 7.0.0.23 installed.  

Has anyone experienced a similar issue?  Any recommendations?

0 votes



4 answers

Permanent link
I have following statement in my httpd.conf on my CLM server on
- Windows 2008-R2
- IHS 8.0.0.6

ErrorLog "|bin/rotatelogs.exe C:/logs/HTTPServer/error_%Y_%m_%d_%H_%M_%S.log 86400"
CustomLog "|bin/rotatelogs.exe C:/logs/HTTPServer/access_%Y_%m_%d_%H_%M_%S.log 86400" common



1 vote


Permanent link
GIve this one a shot

CustomLog "|rotatelogs.exe -l \"C:/Program iles/IBM/HTTPServer615/logs/access_%Y-%m-%d-%H_%M_%S.log\" 60" common

0 votes

Comments

 Hi Abraham,


I actually tried that option too today, per the recommendation of IBM, but I get the following error in the error.log file when I restart the HTTP server:

Starting the IBM HTTP Server 7.0 service
The IBM HTTP Server 7.0 service is running.
s.exe -l "C:/Program Files/IBM/HTTPServer/logs/access_%Y-%m-%d-%H_%M_%S.log" 60': The system cannot find the file specified.  
Unable to open logs

Prepending "bin/" before rotatelogs.exe does not help either.


Permanent link
try the following

customLog "|rotatelogs.exe -l /logs/access.log 60" common

when I saved this in the httpd.conf I ran the apache -t command and confirmed the syntax is correct.

0 votes

Comments

I'm afraid I tried this as well.  The Syntax is OK.


Permanent link
One other suggestion.  SInce IHS is running as a service, use absolute paths.

0 votes

Comments

 That was actually the first thing I tried.  It also didn't work.  I also checked the syntax to make sure I wasn't doing a mistake.  :(

Your answer

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 7,507
× 6,131

Question asked: Jul 17 '13, 7:32 p.m.

Question was seen: 19,250 times

Last updated: Oct 31 '13, 9:48 a.m.

Confirmation Cancel Confirm