SetEnvIf

Discussion in 'Server Operation' started by nanu, Mar 6, 2009.

  1. nanu

    nanu New Member

    Hi!

    I'm new to Apache and Linux.
    On a Suse 10 sp1 WEB server, I installed the Analog, logfile analyser .

    The access_log file contains the following example lines:
    192.168.254.254 - - [06/Mar/2009:11:10:22 +0200] "GET /req.png HTTP/1.0" 200 5373 "http://www.kalmanovitz.co.il/Analog_Report.html" "Mozilla/5.0 (Windows; U; Windows NT 5.1; he; rv:1.9.0.7) Gecko/2009021910 Firefox/3.0.7"
    ::1 - - [06/Mar/2009:11:10:32 +0200] "GET /" 400 991
    ::1 - - [06/Mar/2009:11:10:33 +0200] "GET /" 400 991
    ::1 - - [06/Mar/2009:11:10:34 +0200] "GET /" 400 991
    ::1 - - [06/Mar/2009:11:10:35 +0200] "GET /" 400 991
    ::1 - - [06/Mar/2009:11:10:36 +0200] "GET /" 400 991
    ::1 - - [06/Mar/2009:11:10:37 +0200] "GET /" 400 991
    ::1 - - [06/Mar/2009:11:10:38 +0200] "GET /" 400 991
    192.168.254.254 - - [06/Mar/2009:11:10:44 +0200] "GET /k_comm/Israel/English/Maps/Cities/Tel-Aviv-Yaffa/Old_Jaffa/pages/Yaffa_0095_jpg.htm HTTP/1.0" 200 505 "http://www.kalmanovitz.co.il/Analog_Report.html" "Mozilla/5.0 (Windows; U; Windows NT 5.1; he; rv:1.9.0.7) Gecko/2009021910 Firefox/3.0.7"


    Analog "decided" that the lines like
    ::1 - - [06/Mar/2009:11:10:32 +0200] "GET /" 400 991
    ::1 - - [06/Mar/2009:11:10:33 +0200] "GET /" 400 991
    are "corrupted".

    I was told to define a SetEnvIf Remote_Addr "::1" dontlog command, but it doesn't prevent the log of those lines.

    Please help to define the right SetEnvIf command.

    Can be other solution?

    TIA

    Nanu
     
  2. falko

    falko Super Moderator Howtoforge Staff

    What exactly did you change in your Apache configuration?
     
  3. nanu

    nanu New Member

    Hi!

    1. In the file /etc/sysconfig/apache2,
    APACHE_ACCESS_LOG="CustomLog /var/log/apache2/access_log combined"
    was changed to
    APACHE_ACCESS_LOG=""

    2. In the file /etc/apache2/default-server.conf
    were added 2 lines:
    i) after the Alias... was added
    SetEnvIf Remote_Addr "::1" dontlog

    ii) et the end, as the last line was added
    CustomLog /var/log/apache2/access_log combined env=!dontlog

    This is what I know about.

    TIA

    Nanu
     
  4. falko

    falko Super Moderator Howtoforge Staff

    Can you try
    Code:
    SetEnvIf Remote_Addr ::1 dontlog
    (without quotation marks) or
    Code:
    SetEnvIf Remote_Addr ^::1$ dontlog
    ?
     
  5. nanu

    nanu New Member

    Hi!

    Sorry, it doesn't solve the problem.

    TIA

    Nanu
     
  6. falko

    falko Super Moderator Howtoforge Staff

    Not sure what it is, but maybe this doesn't work with IPv6 addresses...
     
  7. nanu

    nanu New Member

    Thanks, but:
    1. It is an original Suse 10 sp 1 web server, do u think if it can have any IPv6 addresses configuration?

    2. How can I check if there are any IPv6 addresses configuration and how cant it be dissabled?

    3. Am I the only one with this problem? It seems strange that Analog people doesn't have any solution.

    TIA

    nanu
     
  8. falko

    falko Super Moderator Howtoforge Staff

    I think so, but I'm no SUSE expert. :eek:
     
  9. id10t

    id10t Member

    Well, that address is the ipv6 equivalent to 127.0.0.1 aka localhost

    If you arent doing anything with ipv6, then just disable it
     

Share This Page