Automatically saving access_log...

Problems with the Linux version of XAMPP, questions, comments, and anything related.

Automatically saving access_log...

Postby Jakeup » 01. September 2011 12:43

Hello. We have a server that hosts multiple sites. The server is under Linux, but the system is xampp. You know that there is a file access_log.

Can you tell me, is there a way to get the server to automatically store this folder in the access_log logs / meseci / Septemvi named 01.09.2011.txt .... and thus be stored for a whole month, for each day in that folder for months after storage to delete the contents of access_log, it can be saved for the next day.


Tell me something like it possible - if so - how to do it, but please explain in detail, if not possible - is there any program that can do for me ...
Jakeup
 
Posts: 3
Joined: 01. September 2011 12:41

Re: Automatically saving access_log...

Postby JonB » 01. September 2011 14:27

Yes, there are many ways to do this. There are also ways to customize how the log is formatted, and named.
I 'assume' you are using vhosts - you can specify the logs host by host.

The bottom line is you can completely customize how the logs work, what they are named, where they are saved and how you are going to slice and dice them later.

http://httpd.apache.org/docs/current/logs.html

http://linux.about.com/od/commands/l/bl ... ogrota.htm

http://www.splunk.com/

http://www.webalizer.org/

also Google these things:
Linux log rotation
logrotate
webmin
webalizer

This is an extensive topic, you would do well to read through the many, many, many options. I have used pretty much all of these tools (plus other commercial products). One word of advice - stick to standard formats for the log contents, that way you have not eliminated data that you may find important at a later date.

Good Luck
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Automatically saving access_log...

Postby Jakeup » 01. September 2011 15:42

Thank you. I've opened the links, and i see what you were talking about.

But, i'm quiet noob at servers :| So can you explane me what to download, how to start it, and how to set it on, to make the logs saved.
Jakeup
 
Posts: 3
Joined: 01. September 2011 12:41

Re: Automatically saving access_log...

Postby JonB » 01. September 2011 20:27

Short answer - I'm happy to point out resources, but I won't do the work for you. I'm a believer in the biblical advice - “Give a man a fish; you have fed him for today. Teach a man to fish; and you have fed him for a lifetime" You said you are a noob, so I was I - how did that happen, I learned by doing and researching. I didn't KNOW those URL's for products or resources by accident, I keep a BIG link library, and I still Google very request I have not answered in a while.

BIG answer - Daily logs - That's a very poor idea. You will be unable to do meaningful traffic analysis, security analysis, or debugging without re-aggregating the data. I suggest you consider making the period either weekly or monthly if you insist on periodic reporting. If you have problems with log size, you should not be using XAMPP period - As has been said too many times - XAMMP was never intended for production use. If you are using it that way, that's a poor idea also.

How to information -

Logrotate will do what you want. Its built in to Linux, you'll also need to understand job scheduling a bit Google 'cron'.
this is a good tutuorial

http://www.techrepublic.com/article/man ... te/1052474

You will still need to a tool re-aggregate the backup logs- I suggest learning Splunk, Webalizer (it comes with XAMPP) or Sawmill ( a commercial product)

Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 9 guests