Apache Logs Setup

Computer builds, hardware and software discussion or troubleshooting, including peripherals. Essentially a general place to talk about desktop computers.
Locked
wldkos
Posts: 830
Joined: Mon Feb 24, 2003 12:19 pm

Apache Logs Setup

Post by wldkos »

i think I need some help setting up my logs. By default they work just fine, by loggin the errors and requests, but i think I want some more info. Is there a way to find out how many hits i am getting or make the logs more/less detailed? i don't think it makes much difference that i am on Linux, since the syntax is the same in the httpd.conf.


What can i do red?

Archived topic from Iceteks, old topic ID:864, old post ID:7490
User avatar
Red Squirrel
Posts: 29209
Joined: Wed Dec 18, 2002 12:14 am
Location: Northern Ontario
Contact:

Apache Logs Setup

Post by Red Squirrel »

Well there's a place in the conf file to decide what you want to log, it's clearly commented there, as for knowing how many hits, you need to use a program such as webalizer which you just install on your host, I never tried it, but I think all you have to do is install it and spefify a log directory.

Just a tip with logs, it's good to rotate them ever so and so, I used to do mine every night. I would just close apache, rename it to jun11-03.log for example and open back apache and it would create a new access.log. That way, if you need to check something, you are not opening a file that is several hundred megs long. Not sure about Linux but I know in windows that's almsot impossible. Once someone hacked into my mail server and I had a 200Meg log file and I never managed to get it open, in note pad it would not let me, and in word pad it would just freeze. Thank goodness I had rotated it for the first time durring the hack attack so I ended up getting the info anyway. I should of kept record of these things, chances are the IP would match the range I always keep an eye out for here. :)

Hope this helps. ;)

Archived topic from Iceteks, old topic ID:864, old post ID:7492
Honk if you love Jesus, text if you want to meet Him!
wldkos
Posts: 830
Joined: Mon Feb 24, 2003 12:19 pm

Apache Logs Setup

Post by wldkos »

So every night I would have to restart apache and then rename the log file? Sounds like too much for me. And the webalizer, i can run that off my machine with CGI right?

Archived topic from Iceteks, old topic ID:864, old post ID:7522
User avatar
Red Squirrel
Posts: 29209
Joined: Wed Dec 18, 2002 12:14 am
Location: Northern Ontario
Contact:

Apache Logs Setup

Post by Red Squirrel »

Yeah, webalizer should work from the server. For the logs, you don't have to make them in different files if you don't want, but be warned that you will end up having this HUGE log file, in will reach the GB range in no time.

Archived topic from Iceteks, old topic ID:864, old post ID:7530
Honk if you love Jesus, text if you want to meet Him!
wldkos
Posts: 830
Joined: Mon Feb 24, 2003 12:19 pm

Apache Logs Setup

Post by wldkos »

got ya.

Archived topic from Iceteks, old topic ID:864, old post ID:7568
Locked