SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
/usr/local/apache2/logs/access_log
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
the_meaning_of_the_1st_field
the_meaning_of_the_2nd_field
the_meaning_of_the_3rd_field
the_meaning_of_the_4th_field
the_meaning_of_the_5th_field
the_meaning_of_the_6th_field
....
or
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 once wrote a script to show the error log (I use it a lot when debugging programs) You could probably adapt it to show the access log in a mor ereadable format too:
I once wrote a script to show the error log (I use it a lot when debugging programs) You could probably adapt it to show the access log in a mor ereadable format too:
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.
Hi David,
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.