RE: giving users their own http logs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > There is an alternative provided by apache itself:
> >
> > Use the SetEnvIf directive to set a variable depending a a regular
> > expression over the URI, and set specific CustomLog directives to send
> > the entries matching each variable to a different log file. Example:
> >
> > SetEnvIf Request_URI "^/\~user1/" user1
> > SetEnvIf Request_URI "^/\~user2/" user2
>
> Damn! I used single dot lines for continuation and SMTP treated
> it as end of message. Here is the rest of the previous message:
>
> SetEnvIf Request_URI "^/\~user1/" user1
> SetEnvIf Request_URI "^/\~user2/" user2
> etc...
>
> CustomLog /var/log/user1/access_log common env=user1
> CustomLog /var/log/user2/access_log common env=user2
>


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).

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...

Ben Y




-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux