You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by André Warnier <aw...@ice-sa.com> on 2009/12/24 23:20:23 UTC

Re: [users@httpd] HTTPD Logwatch

Asai wrote:
> Greetings,
> 
> Is there a way which I can expand the logwatch entries for httpd which 
> will allow me to view the entire domain name instead of just the 
> relative uri?  Like I have /this/page instead of www.mysite.com/this/page.
> 
Can you explain what would be the point ?
Presumably, if clients access your site, you already know the name of 
the site, no ?

Or maybe you want to look at this page :
http://httpd.apache.org/docs/2.2/mod/directives.html
and lookup the "CustomLog" and "LogFormat" directives.


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


Re: [users@httpd] HTTPD Logwatch

Posted by Asai <as...@globalchangemusic.org>.
==================================================================
> Logwatch is a Linux/Unix utility that reports on whatever logs it is
> requested to report.  Here is the description from the MAN file.
>
> "
> LogWatch is a customizable, pluggable log-monitoring system.  It will go
> through your logs for a given period of time and make a report in
> the areas that you wish with the detail that you wish.  Easy to use -
> works right out of the package on almost all systems.
> "
>
> Normally HTTPD logs are reported along with any other system logs.  Here
> is a sample of this morning's (remarkably small!) report for my server.
> Most mornings this report is several hundred lines long; mostly hackers.
>   
Yes, that's correct.  LogWatch is what I'm referring to.  It's an 
aggregation of HTTPD logs and other server logs which is emailed to me 
daily.

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


Re: [users@httpd] HTTPD Logwatch

Posted by John Iliffe <jo...@iliffe.ca>.
On Fri, 2009-25-12 at 12:23 +0100, André Warnier wrote:
> Kaustubh Deorukhkar wrote:
> > I am naive user..but this is what comes to my mind...please see if this
> > helps
> > 
> > - create seperate logs per website...
> > 
> > SetEnvIf Referer www\.mydomain1\.com site1_request
> > CustomLog logs/mydomain1_log common env=site1_request
> > 
> > SetEnvIf Referer www\.mydomain2\.com site2_request
> > CustomLog logs/mydomain2_log common env=site2_request
> > ...
> > 
> This won't work. The "referer" is the name of the system the request 
> comes *from*, not the host who serves it.
> As Lukreme mentions, you can have (and probably the OP has) different 
> logfiles for each website, with Virtual Hosts.
> But I believe the OP's issue is different.  The "logwatch" he's talking 
> about is probably some utility which monitors several logfiles at once.
> But let him explain.
> 
> ---------------------------------------------------------------------
> 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
> 
===========================================================================
Logwatch is a Linux/Unix utility that reports on whatever logs it is
requested to report.  Here is the description from the MAN file.

"
LogWatch is a customizable, pluggable log-monitoring system.  It will go
through your logs for a given period of time and make a report in
the areas that you wish with the detail that you wish.  Easy to use -
works right out of the package on almost all systems.
"

Normally HTTPD logs are reported along with any other system logs.  Here
is a sample of this morning's (remarkably small!) report for my server.
Most mornings this report is several hundred lines long; mostly hackers.

 --------------------- httpd Begin ------------------------ 

A total of 2 unidentified 'other' records logged
  GET /err HTTP/1.1 with response code(s) 404 1 responses
  GET /./err HTTP/1.1 with response code(s) 404 1 responses

Requests with error response codes
  GET /err HTTP/1.1 with response code(s) 404 1 responses
  GET /././.html HTTP/1.1 with response code(s) 403 1 responses
  GET /./.html HTTP/1.1 with response code(s) 403 1 responses
  GET /./err HTTP/1.1 with response code(s) 404 1 responses
  GET /.html HTTP/1.1 with response code(s) 403 1 responses

 ---------------------- httpd End ------------------------- 

-----------------------------------------------------------------------

Regards,

John
=========================================================



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


Re: [users@httpd] HTTPD Logwatch

Posted by André Warnier <aw...@ice-sa.com>.
Kaustubh Deorukhkar wrote:
> I am naive user..but this is what comes to my mind...please see if this
> helps
> 
> - create seperate logs per website...
> 
> SetEnvIf Referer www\.mydomain1\.com site1_request
> CustomLog logs/mydomain1_log common env=site1_request
> 
> SetEnvIf Referer www\.mydomain2\.com site2_request
> CustomLog logs/mydomain2_log common env=site2_request
> ...
> 
This won't work. The "referer" is the name of the system the request 
comes *from*, not the host who serves it.
As Lukreme mentions, you can have (and probably the OP has) different 
logfiles for each website, with Virtual Hosts.
But I believe the OP's issue is different.  The "logwatch" he's talking 
about is probably some utility which monitors several logfiles at once.
But let him explain.

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


[users@httpd] Re: HTTPD Logwatch

Posted by LuKreme <kr...@kreme.com>.
On 24-Dec-2009, at 22:37, Kaustubh Deorukhkar wrote:
> I am naive user..but this is what comes to my mind...please see if this
> helps
> 
> - create seperate logs per website…

You do this by specifying the logfile name and format in the the VirtualHost directives.

-- 
'I'm a raven, aren't I?' it said. 'One of the few birds who speak. The first thing people say is, oh, you're a raven, go on, say the N word... If I had a penny for every time that's happened, I'd-' --Soul Music


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


Re: [users@httpd] HTTPD Logwatch

Posted by Kaustubh Deorukhkar <ka...@gmail.com>.
I am naive user..but this is what comes to my mind...please see if this
helps

- create seperate logs per website...

SetEnvIf Referer www\.mydomain1\.com site1_request
CustomLog logs/mydomain1_log common env=site1_request

SetEnvIf Referer www\.mydomain2\.com site2_request
CustomLog logs/mydomain2_log common env=site2_request
...


Regards,
kaustubh

On Fri, Dec 25, 2009 at 5:43 AM, André Warnier <aw...@ice-sa.com> wrote:

> Asai wrote:
>
>> I manage about 20 websites.  So I need to see which ones are reporting
>> which things.  I've checked the custom log in the past, it didn't do what I
>> wanted, but perhaps I didn't understand what I was doing--which is quite
>> likely.
>>
>
> Maybe you want to explain what you mean by "logwatch" then ?
> If this is a separate program from the Apache httpd suite, do not assume
> anyone here knows what you are talking about.
>
> As indicated below, you can change the format of the CustomLog to include
> pretty much anything you want.  Did you actually go look at these pages ?
>
>
>
>> André Warnier wrote:
>>
>>> Asai wrote:
>>>
>>>> Greetings,
>>>>
>>>> Is there a way which I can expand the logwatch entries for httpd which
>>>> will allow me to view the entire domain name instead of just the relative
>>>> uri?  Like I have /this/page instead of www.mysite.com/this/page.
>>>>
>>>>  Can you explain what would be the point ?
>>> Presumably, if clients access your site, you already know the name of the
>>> site, no ?
>>>
>>> Or maybe you want to look at this page :
>>> http://httpd.apache.org/docs/2.2/mod/directives.html
>>> and lookup the "CustomLog" and "LogFormat" directives.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>
>

Re: [users@httpd] HTTPD Logwatch

Posted by André Warnier <aw...@ice-sa.com>.
Asai wrote:
> I manage about 20 websites.  So I need to see which ones are reporting 
> which things.  I've checked the custom log in the past, it didn't do 
> what I wanted, but perhaps I didn't understand what I was doing--which 
> is quite likely.

Maybe you want to explain what you mean by "logwatch" then ?
If this is a separate program from the Apache httpd suite, do not assume 
anyone here knows what you are talking about.

As indicated below, you can change the format of the CustomLog to 
include pretty much anything you want.  Did you actually go look at 
these pages ?

> 
> André Warnier wrote:
>> Asai wrote:
>>> Greetings,
>>>
>>> Is there a way which I can expand the logwatch entries for httpd 
>>> which will allow me to view the entire domain name instead of just 
>>> the relative uri?  Like I have /this/page instead of 
>>> www.mysite.com/this/page.
>>>
>> Can you explain what would be the point ?
>> Presumably, if clients access your site, you already know the name of 
>> the site, no ?
>>
>> Or maybe you want to look at this page :
>> http://httpd.apache.org/docs/2.2/mod/directives.html
>> and lookup the "CustomLog" and "LogFormat" directives.
>>
>>
>> ---------------------------------------------------------------------
>> 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


Re: [users@httpd] HTTPD Logwatch

Posted by Asai <as...@globalchangemusic.org>.
I manage about 20 websites.  So I need to see which ones are reporting 
which things.  I've checked the custom log in the past, it didn't do 
what I wanted, but perhaps I didn't understand what I was doing--which 
is quite likely.

André Warnier wrote:
> Asai wrote:
>> Greetings,
>>
>> Is there a way which I can expand the logwatch entries for httpd 
>> which will allow me to view the entire domain name instead of just 
>> the relative uri?  Like I have /this/page instead of 
>> www.mysite.com/this/page.
>>
> Can you explain what would be the point ?
> Presumably, if clients access your site, you already know the name of 
> the site, no ?
>
> Or maybe you want to look at this page :
> http://httpd.apache.org/docs/2.2/mod/directives.html
> and lookup the "CustomLog" and "LogFormat" directives.
>
>
> ---------------------------------------------------------------------
> 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
>

-- 
--asai


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