Jump to content

Exclude My Ip Completely From The Logs


kitsch
 Share

Recommended Posts

Hello,

 

What I'm trying to do is exclude my (static, cable) IP completely from the web server logs. As I understand this could be accomplished by using .htaccess. Or?

 

Why? Because I check the latest visitors link in the CP quite often and if I made any visits to the the sites I must skip to this looong list of files accessed from my own IP and only afterwards I can see the hits made by other visitors. A workaround could be to enable manual updating for AWStats and exclude myself from those stats (I already made the necessary modifications to the awstats.conf file) but I don't want to put too much strain on your servers by updating the stats every two hours or so (even if my site had kind of a low traffic)...

 

Thanks in advance for your help.

 

And since this is my first post here on the forums let me just say that:

 

:P

Link to comment
Share on other sites

Since you have a static IP this can be done with ease.

 

In the home directory go to /tmp/awstats.

You will find a file named awstats.yoursite.com.conf,

if you have subdomains there will also be files named awstats.sub.yoursite.com.conf.

Open each of these files and find this section

># Do not include access from clients that match following criteria.
# If your log file contains IP adresses in host field, you must put here
# matching IP adresses criteria.
# If DNS lookup is already done in your log file, you must put here hostname
# criteria.
# Note: Use space between each value.
# Example: "127.0.0.1 163.84. 201.101.51.1"
# Example: "localhost abcxyz"
# Default: ""
#
SkipHosts=""

Change SkipHosts="" to SkipHosts="y.ou.r.ip"

Save each file back to your site and set the permissions for each to 444. If you don't set the permissions then the changes will be overwritten when the server updates.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...