SlackwareThis Forum is for the discussion of Slackware Linux.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
This is really an apache question - not slackware question. But I have always received excellent advice from Slackware folks than anyone else. I am taking advantage of knowledge of slack floks once again.
A standard apache installation yields an access log file called
and after the server is up running for a while, it is usually loaded with contents like:
I would appreciate the answers to my question come in the following formats:
1) a simplified answer such as
2) a pointer (a hyperlink) to the documenation where a detailed explanation can be found.
By the way, does access_log provide any indication of security breach of the web server? If so, how does one tell by reading the log?
I assume you are talking about the script.
1) Put it in a file called log.cgi within your cgi-bin
2) Give it executeable permissions
3) Make sure the error log file is pointing to the right place
4) Set the permissions on the logs/logs directory so the web server can read it.
5) Access http://yourhost/cgi-bin/log.cgi
That's it! It automatically displays the last 15 lines of the error log in an easy to read table. It tries to group errors related to each individual access and puts an <HR> (horizontal rule) between them.
If you want to see more than the last 15 lines then append the number of lines to view to the filename as a query string. To disply the last 100 - http://yourhost/cgi-bin/log.cgi?100
Woohoo! Worked great, thanks! I tried to make an access log the same way, but it didn't quite work out the same, the date/time wasn't displayed, and all entries were grouped into one. But I will work on that...
I keep meaning to - I just never get round to it. No time like the present I suppose!
I'm glad you like it. I was just getting annoyed at reading horrible raw logs. There are plenty of analysers for access logs but nothing for us poor developers. There are a few simple enhancements that I may make at some point but consider it as GPL
During which I almost completly rewrote a script then deleted half of it to find that for some reason my editor wouldn't let me undo. The I rewrote that stuff again, added bits - decided how to display the access log and tested it.
Oh I almost forgot the part where I tried to be clever and sent my server running 2 permenant loops (don't worry I fixed that :D)
Anyway I think I'll stop for the night before I delete anything else or accidentally advise soemone to run "rm -rf /"
Let me know how you get on with it - there are now some config options at the top that you may want to set first. if you have any problems or think I made a boo boo then I'll see what I can do.
I tried the first script and it works nicely!
What I would like to know is how to change it so that it will look for a log file that changes the name from day to day.
I tried several wild card substitutions but with no success.
Thanks, Ed Simpson