httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joseph Marcelletti" <jmarcelle...@gmail.com>
Subject Re: [users@httpd] Question about how apache handles file opening with logging
Date Thu, 11 Oct 2007 18:18:33 GMT
Thanks for the insight on that. I wasn't quite aware of that problem
but the simplest work around is having it logged to the users
directory, under a logs folder which is owned by root:root and not the
user.. This prevents the issue you spoke of. The thing I am faced
with, is I need a way to provide the user their logs in real time, for
reading, yet being gentle on the system. I see alot of control panels
using their own apache modules to do bandwidth logging, and I am
afraid I am unable to write an apache module. Cpanel uses BytesLog
(mod_log_bytes) and hsphere uses something similar they wrote in
house. I am actually shocked there is nothing publically available
that can do this:

LogFormat "%v %{%F}t %I %O" byteslog

It would be nice to be able to do that log on a global basis (no entry
required per vhost) and then allow normal logging per vhost. Does
anyone have a suggestion for this?

On 10/11/07, Joshua Slive <joshua@slive.ca> wrote:
> On 10/10/07, Joseph Marcelletti <jmarcelletti@gmail.com> wrote:
>
> > I actually use a different log format then combinedio, but the point
> > is made. The question is, if I have say 50 virtual hosts with the same
> > format.. 1 customlog for a log in their home directory, and a
> > customlog that is IDENTICAL in every virtualhost.. does apache use 1
> > file handle for the global.log? Is this the most efficient way to
> > accomplish the goal? (The goal being having X information about each
> > vhost logged to the same global file).
>
> I think you'll get 1 file handle for each CustomLog line. You can use
> lsof to verify.
>
> What you're doing probably isn't a good idea anyway. It appears you
> are writing log files to user directories. As the security warnings in
> the docs tell you, this allows your users to gain root on the server.
> You are better off logging to one log file (or one piped-logging
> program) and post-splitting the log lines for your individual user
> logs.
>
> Joshua.
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message