Re: giving users their own http logs

From: Javier Gostling (jgd_at_samwan.homeip.net)
Date: 01/12/04

  • Next message: Jack Wang: "About grep"
    To: redhat-list@redhat.com
    Date: Mon, 12 Jan 2004 00:32:51 -0300
    
    

    On Fri, Jan 09, 2004 at 01:54:00PM -0800, Ben Yau wrote:
    > Hey
    > That's neat. I haven't seen that before. Could you explain a bit more
    > about how that works? Does it check the whole logfile entry or is it smart
    > enough to only check a certain field in LogFormat (I guess %r in this case).

    The directives used and their purpose is explained in the Apache
    documentation, so I won't go deeply into it, but just see the specific
    features used here:

    The SetEnvIf documentation reads:

    "Request_URI - the resource requested on the HTTP request line --
    generally the portion of the URL following the scheme and host portion
    without the query string"

    This means that if the URL requested by a browser is
    "http://www.site.com/user1/index.html", then "SetEnvIf Request_URI" will
    only match against "/user1/index.html".

    Also note, from mod_log_config documentation, that %r is "First line of
    request", so the request method is included, as well as the querystring,
    which are not matched by SetEnvIf.

    > In the email before this Chris (the OP) mentioned he'd like to keep the
    > original logs intact as well while providing real-time logging for users and
    > if this works it'd certainly do the trick. Looks like the big upside of
    > this compared to scripting is the realtime separate logging is much more
    > smooth. The possible downside is the changing of the .conf file and
    > restarting of apache whenever you need to add or take away users if you have
    > to do that often. I wonder if there's a way to do this and specify pattern
    > matching in the .conf for httpd :) hmm...

    >From what I've read, there is no way to do pattern matching. It would
    probably be way to hard to do that, since you need to different
    directives to perform this trick. The neat thing, is that by preserving
    the standard CustomLog directive in your .conf file, you can maintain a
    consolidated log for your own purposes (auditing, legal, etc.)

    For more details on this, check the apache documentation which is pretty
    well rounded up.

    Cheers,

    -- 
    Javier Gostling D.
    <jgd@samwan.homeip.net>
    -- 
    redhat-list mailing list
    unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
    https://www.redhat.com/mailman/listinfo/redhat-list
    

  • Next message: Jack Wang: "About grep"

    Relevant Pages

    • RE: Advice regarding a strange Internet page
      ... > This is a placeholder page installed by the Debian release of the Apache Web ... > server package, because no home page was installed on this host. ... > The Apache documentation stored on your server. ...
      (microsoft.public.windowsxp.help_and_support)
    • Advice regarding a strange Internet page
      ... This is a placeholder page installed by the Debian release of the Apache Web ... server package, because no home page was installed on this host. ... The Apache documentation stored on your server. ...
      (microsoft.public.windowsxp.help_and_support)
    • Re: .htaccess & Redirect permanent
      ... I checked the Apache documentation and didn't ... explicitly find any syntax documented for a negated match. ... to work in Apache 2.0 for excluding jobs.php from the Auth stanza: ...
      (comp.infosystems.www.servers.unix)
    • Re: Advice regarding a strange Internet page
      ... >> This is a placeholder page installed by the Debian release of the Apache ... >> server package, because no home page was installed on this host. ... >> The Apache documentation stored on your server. ...
      (microsoft.public.windowsxp.help_and_support)
    • Re: tomcat5+apache2+mod_jk2
      ... here is the Apache error_log file. ... Tomcat etc. are from Apache Project. ... > Did you try this documentation: ... # In order to enable jni use any channelJni directive ...
      (comp.lang.java.help)

    Loading