Z2 logs

classic Classic list List threaded Threaded
4 messages Options
Mihailo Tasic Mihailo Tasic
Reply | Threaded
Open this post in threaded view
|

Z2 logs

Hi All,

 

Has anybody ever experienced the following weirdness: Using Apache standard rewrite statement to a Zope instance creates Z2 log entrees as if they are all coming from a local host?

 

RewriteRule ^/(.*) http://localhost:14080/VirtualHostBase/http/limehousesoftware.co.uk:80/lhs/VirtualHostRoot/$1 [P]

 

Linux flavour: Gentoo

Zope 2.77

Apache Apache/2.0.54

 

The same statement on

Linux flavour: Red Hat

Zope 2.77

Apache/2.0.46

 

Works just right…

 

Thanks a lot,

Mika

Chris Miles-3 Chris Miles-3
Reply | Threaded
Open this post in threaded view
|

Re: Z2 logs

The requests /are/ coming from localhost.  They are coming from Apache,
which is proxying the user's request.  Look in Apache's access.log if
you want to examine the browser request logs.

CM

On 2005-10-18 11:19:25 +0100, "Mihailo Tasic"
<[hidden email]> said:

> Has anybody ever experienced the following weirdness: Using Apache standard
> rewrite statement to a Zope instance creates Z2 log entrees as if they are
> all coming from a local host?
>
> RewriteRule ^/(.*)
> http://localhost:14080/VirtualHostBase/http/limehousesoftware.co.uk:80/lhs/V
> irtualHostRoot/$1 [P]
>
>
> Linux flavour: Gentoo
>
> Zope 2.77
>
> Apache Apache/2.0.54
>
>
> The same statement on
>
> Linux flavour: Red Hat
>
> Zope 2.77
>
> Apache/2.0.46
>
>
> Works just right.
>
> --
http://chrismiles.info/




-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Plone-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
Gareth Adams-2 Gareth Adams-2
Reply | Threaded
Open this post in threaded view
|

Re: Re: Z2 logs

I've had this problem too.

I always assumed that the trusted-proxy setting in zope.conf let you
specify which proxies you believed gave the right X-Forwarded-For
header, and the IP address in that header was used instead of the proxy
address.

I never found out why that wasn't the case though :(

In the end, the apache logs do work fine, but it seems a bit of a waste.

Gareth

Chris Miles wrote:

> The requests /are/ coming from localhost.  They are coming from
> Apache, which is proxying the user's request.  Look in Apache's
> access.log if you want to examine the browser request logs.
>
> CM
>
> On 2005-10-18 11:19:25 +0100, "Mihailo Tasic" <[hidden email]>
> said:
>
>> Has anybody ever experienced the following weirdness: Using Apache
>> standard
>> rewrite statement to a Zope instance creates Z2 log entrees as if
>> they are
>> all coming from a local host?
>>
>> RewriteRule ^/(.*)
>> http://localhost:14080/VirtualHostBase/http/limehousesoftware.co.uk:80/lhs/V 
>>
>> irtualHostRoot/$1 [P]
>>
>>
>> Linux flavour: Gentoo
>>
>> Zope 2.77
>>
>> Apache Apache/2.0.54
>>
>>
>> The same statement on
>>
>> Linux flavour: Red Hat
>>
>> Zope 2.77
>>
>> Apache/2.0.46
>>
>>
>> Works just right.
>>
>> --
>
> http://chrismiles.info/
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content, downloads, discussions,
> and more. http://solutions.newsforge.com/ibmarch.tmpl
> _______________________________________________
> Plone-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/plone-users
>



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Plone-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
Dieter Maurer Dieter Maurer
Reply | Threaded
Open this post in threaded view
|

Re: Z2 logs

In reply to this post by Mihailo Tasic
Mihailo Tasic wrote at 2005-10-18 11:19 +0100:
>Has anybody ever experienced the following weirdness: Using Apache standard
>rewrite statement to a Zope instance creates Z2 log entrees as if they are
>all coming from a local host?

The mailing list archive answers your question: lots of people
experienced this.

And, if you think about it, it is quite natural: all these
request come from Apache (probably running on local host).

You may get more informative results, if you
activate "ProxyVia" in Apache and define the Apache
host as a "trusted-proxy" in Zope's configuration file.

A better approach is to forget the Zope Z2 log file
and use Apache logging instead.


--
Dieter


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Plone-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users