New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

How to skip logging of one's own IP to apache2/access.log?

A collection of tips on howto tweak your Bubba.
Post Reply
toukie
Posts: 115
Joined: 13 Jan 2012, 12:22

How to skip logging of one's own IP to apache2/access.log?

Post by toukie »

It's useless to have one's own IP to be shown in the /var/log/apache2/access.log. How can it be skipped? The instructions I found didn't work out, "CustomLog" was not allowed etc. I guess that it can be done, but how? It would give a much neater logfile.
Binkem
Posts: 388
Joined: 10 Jul 2008, 02:26

Re: How to skip logging of one's own IP to apache2/access.lo

Post by Binkem »

Hi Toukie,

This is a good question, which I'm unfortunately not able to answer. It should be posted in the B2 & B3 support forum though. This part of the forum is for posting howto's explaining how to install/update/tweak a part of the B2/B3 software. If you've solved the qustion you might want to write the howto here :)

Martijn
toukie
Posts: 115
Joined: 13 Jan 2012, 12:22

Re: How to skip logging of one's own IP to apache2/access.lo

Post by toukie »

Hi Binkem,

You are probably right about posting but this thing falls somewhere between the categories. Support is more when things don't work, this was like a feature request.

Closest I came was this: http://www.electrictoolbox.com/apache-s ... onnection/ but I didn't find the things that are named there. Maybe there is a clue for someone who knows things better. Apache may have changed a bit, or there are different versions or whatever.

The thing can be done for sure. I'm waiting for the eventual Howto to be posted right here :D
nobody
Posts: 226
Joined: 10 Mar 2012, 14:46

Re: How to skip logging of one's own IP to apache2/access.lo

Post by nobody »

The easiest way to get rid of localhost is
Cat access_log | grep -v localhost
.
The second bes t solution i guess is splitting your host into two separate vhosts, both with a documentroot to the same position. Then make one point to the. Internal interface
<virtualhost 127.0.0.1:80>
and the other to the external inerface. Then finally set two separate log files. Domt forget to update syslog.conf as well..
toukie
Posts: 115
Joined: 13 Jan 2012, 12:22

Re: How to skip logging of one's own IP to apache2/access.lo

Post by toukie »

THNX nobody!
The alternative number 1 works fine when written as:
cat /var/log/apache2/access.log | grep -v xyz.xyz.xyz.xyz One's own IP is omitted, that's neat.

The other alternative flies far beyond my digital horizon.
Gordon
Posts: 1461
Joined: 10 Aug 2011, 03:18

Re: How to skip logging of one's own IP to apache2/access.lo

Post by Gordon »

nobody wrote:Then finally set two separate log files. Domt forget to update syslog.conf as well..
There's no need to update syslog. I use named hosts with separate log files myself and it works straight out of the box. Even log rotation is handled.
nobody
Posts: 226
Joined: 10 Mar 2012, 14:46

Re: How to skip logging of one's own IP to apache2/access.lo

Post by nobody »

apologies, I meant logrotate. Depending om what exotic logfilename you enter in the vhost config, you may very well need to add that name in /etc/logrotate.d/apache2. If you cal the file /var/log/apache/somehostfilename.log then it is automatically included.
Post Reply