{"id":40,"date":"2007-06-13T00:04:15","date_gmt":"2007-06-13T05:04:15","guid":{"rendered":"http:\/\/www.dannorris.com\/2007\/06\/13\/oracle-http-server-apache-rotatelogs-configuration\/"},"modified":"2019-04-01T13:59:31","modified_gmt":"2019-04-01T13:59:31","slug":"oracle-http-server-apache-rotatelogs-configuration","status":"publish","type":"post","link":"https:\/\/www.dannorris.com\/blog\/2007\/06\/13\/oracle-http-server-apache-rotatelogs-configuration\/","title":{"rendered":"Oracle HTTP Server (Apache) rotatelogs configuration"},"content":{"rendered":"<p>\t\t\t\tIs it just me, or does Oracle pick useless defaults? The latest case I encountered (just one of several) is the default Oracle Application Server configuration for logging. Both the HTTP Server ErrorLog and CustomLog use rotatelogs, but if they go so far as to configure rotatelogs, why not make some sensible defaults?<\/p>\n<p>Here are the defaults I found at a recent OAS 10.1.2.0.2 installation:<!--more--><br \/>\n<code><br \/>\nErrorLog \"|\/u01\/oracle\/product\/10.1.2\/midtier\/Apache\/Apache\/bin\/rotatelogs \/u01\/oracle\/product\/10.1.2\/midtier\/Apache\/Apache\/logs\/error_log 43200\"<\/code><br \/>\n<code><br \/>\nCustomLog \"|\/u01\/oracle\/product\/10.1.2\/midtier\/Apache\/Apache\/bin\/rotatelogs \/u01\/oracle\/product\/10.1.2\/midtier\/Apache\/Apache\/logs\/access_log 43200\" common<\/code><\/p>\n<p>My personal favorite practice is to update these parameters so that<\/p>\n<ol>\n<li>The rollover time for each log is somewhere close to midnight (at least for part of the year).<\/li>\n<li>The logfile name makes sense.<\/li>\n<\/ol>\n<p>Here is what I usually use for my own &#8220;default&#8221; settings:<br \/>\n<code><br \/>\nErrorLog \"|\/u01\/oracle\/product\/10.1.2\/midtier\/Apache\/Apache\/bin\/rotatelogs \/u01\/oracle\/product\/10.1.2\/midtier\/Apache\/Apache\/logs\/error_log.%Y-%m-%d-%H_%M 86400 -300\"<\/code><br \/>\n<code><br \/>\nCustomLog \"|\/u01\/oracle\/product\/10.1.2\/midtier\/Apache\/Apache\/bin\/rotatelogs \/u01\/oracle\/product\/10.1.2\/midtier\/Apache\/Apache\/logs\/access_log.%Y-%m-%d-%H_%M 86400 -300\" common<\/code><\/p>\n<p>Let me explain:<\/p>\n<ul>\n<li>The format (%Y-%m-%d-%H_%M) will make sure that logfiles come out looking like access_log.2007-06-12-00-00 (when they roll over at midnight)<\/li>\n<li>The 86400 part is how often to roll over to a new logfile, in seconds. 86400 is the number of seconds in a day, so this will cause logfiles to roll over once per day.<\/li>\n<li>The -300 is how many minutes away from GMT the logfile will roll over. In this case, it will roll over 5 hours before 00:00 GMT (midnight GMT). For me, in Central time, that means that at least for part of the year, the logfiles should roll over at midnight. The downside of this approach is that it doesn&#8217;t automatically adjust for DST, so you&#8217;ll have to make the modification manually if it&#8217;s really important to you.<\/li>\n<\/ul>\n<p>I also use the non-default parameter &#8220;<code>UseWebCacheIp On<\/code>&#8221; in the middle tier which makes the logfiles much more useful by putting the actual client IP address in the HTTP Server logfiles. Without this parameter, the HTTP Server logfiles are filled with the IP address of the webcache server (usually the same host as the HTTP Server).<\/p>\n<p>That&#8217;s my rant about logfiles for Apache. I guess it&#8217;s the small things in life that really make me happy ;).\t\t<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Is it just me, or does Oracle pick useless defaults? The latest case I encountered (just one of several) is the default Oracle Application Server configuration for logging. Both the HTTP Server ErrorLog and CustomLog use rotatelogs, but if they go so far as to configure rotatelogs, why not make some sensible defaults? Here are &hellip; <a href=\"https:\/\/www.dannorris.com\/blog\/2007\/06\/13\/oracle-http-server-apache-rotatelogs-configuration\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Oracle HTTP Server (Apache) rotatelogs configuration&#8221;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29,15,22],"tags":[],"class_list":["post-40","post","type-post","status-publish","format-standard","hentry","category-app-server","category-oracle","category-technical"],"_links":{"self":[{"href":"https:\/\/www.dannorris.com\/blog\/wp-json\/wp\/v2\/posts\/40","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dannorris.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dannorris.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dannorris.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dannorris.com\/blog\/wp-json\/wp\/v2\/comments?post=40"}],"version-history":[{"count":1,"href":"https:\/\/www.dannorris.com\/blog\/wp-json\/wp\/v2\/posts\/40\/revisions"}],"predecessor-version":[{"id":615,"href":"https:\/\/www.dannorris.com\/blog\/wp-json\/wp\/v2\/posts\/40\/revisions\/615"}],"wp:attachment":[{"href":"https:\/\/www.dannorris.com\/blog\/wp-json\/wp\/v2\/media?parent=40"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dannorris.com\/blog\/wp-json\/wp\/v2\/categories?post=40"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dannorris.com\/blog\/wp-json\/wp\/v2\/tags?post=40"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}