Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 658
  • Last Modified:

domlogs

hi guys,
have a linux box with whm on it,
how can i disable the domlogs on it?
i have to rotate it every 3-4 days when it reaches 2 gig and i want to know if there is a way to disable it,
thanx
0
djsoltan
Asked:
djsoltan
  • 3
  • 3
  • 2
  • +1
1 Solution
 
pablouruguayCommented:
Disable Logs

Writing log information is a time consuming process. Although Apache keeps the log files open so that it's just a case of writing the information, this can take up valuable time. If storing log information is not required, you can save a few processor cycles by disabling it. To do this, simply comment out the log lines in the configuration file.


0
 
pablouruguayCommented:
in /etc/httpd/httpd.conf
0
 
djsoltanAuthor Commented:
hi, can you tell me what line i need to comment out, i just went thro it and cant find it
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
Gabriel OrozcoSolution ArchitectCommented:
I would better rotate logs automatically.
check this page:
http://httpd.apache.org/docs/1.3/logs.html

the "Piped Logs" section has directions on how to modify the line (and what line it is) so a program can handle the rotation every "n" seconds.

I would not disable logs since they are the key for bug hunting, and for log monitoring programs that can show you wat is happening with your server: who is accessing it, what page is the most accessed, what takes longer to show, etc.

I use awstats myself (just to illustrate): http://awstats.sourceforge.net/
0
 
NopiusCommented:
djsoltan, to disable logs:

edit file /usr/local/apache/httpd.conf
or where is your Apache config located
find entries with 'domlog' like:
CustomLog  /usr/local/apache/domlogs/*whatever*
TransferLog  /usr/local/apache/domlogs/*whatever*

comment these lines with '#' sign and restart apache 'apachectl restart'
also you may disable ErrorLog, but I don't recommend to do it.
0
 
djsoltanAuthor Commented:
hi,
thanks for all the inputs,
Redimido,,
i found this line of code.

TransferLog "|rotatelogs /path/to/logs/access_log 86400"

that rotates every 24 hours,
but, how do i use it?
can you walk me throw it please?
p.s if i use this, would i be able to use that aw stats? that looks very good, i took a look at it, and looked very nice.
0
 
Gabriel OrozcoSolution ArchitectCommented:
just check you have that program in your system

locate rotatelogs

or

find /usr -name 'rotatelogs'

and then, just enable it.

awstats requires you to change all your log lines from "default" to be "combined" and then all you need is to download it and a more or less simple configuration.
0
 
djsoltanAuthor Commented:
hi redimido, thanks for the quick reply,
ok, so i do have it
its under /usr/local/apache/bin/rotatelogs
now, to enable it, i have to add it to the httpd.conf right? and if so, does it matter where i copy paste the line or not?
0
 
Gabriel OrozcoSolution ArchitectCommented:
it sorts of matter. there are sections on httpd.conf, so try to find where the TransferLog is, and then modify it.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now