httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Foster, Stephen \(ASPIRE\)" <steve.fos...@hmrcaspire.com>
Subject [users@httpd] Logging problem using mod_proxy and UsePreserveHost
Date Wed, 25 Apr 2007 08:24:12 GMT
Hi all,

i am utilising mod_proxy to serve locally held static content but to proxy any other requests
to a different service. This works fine however i am having problems with the logging of requests.
I have set up my logging format to pick up the client IP address from the headers as the request
goes through a load-balancer first and adds the X-Forwarded-For header. e.g

Logformat "%{%Y-%m-%d %H:%M:%S}t %{X-Forwarded-For}i %{host}i %r %s %b %D %q %{User-Agent}i
%{IR_PORTAL_COOKIE}C %{Referer}i" ORU_extended
This results in a log file entry such as:

2007-04-23 09:16:13 10.101.212.165 dit3.x.y.uk GET /images/arrowRightGreen.gif HTTP/1.1 200
828 498  Mozilla/5.0 (Windows; U; Windows NT 5.0; en-GB; rv:1.7.7) Gecko/20050414 Firefox/1.0.3
- https://dit3.x.y.uk/login?GAREASONCODE=-1&GARESOURCEID=Common&GAURI=https://dit3.x.y.uk/home&Reason=-1&APPID=Common&URI=https://dit3.x.y.uk/home

This format works fine and logs the client IP and the host that the request is intended to
go to for locally served content such as gif's etc.
However for objects that get proxied of to the other backend servers i get a log entry with
the client IP added with a comma after it, e.g

2007-04-23 09:16:11 10.101.212.165, 10.101.212.165 dit3.x.y.uk GET /login?GAREASONCODE=-1&GARESOURCEID=Common&GAURI=https://dit3.x.y.uk/home&Reason=-1&APPID=Common&URI=https://dit3.x.y.uk/home
HTTP/1.1 200 9090 310672 ?GAREASONCODE=-1&GARESOURCEID=Common&GAURI=https://dit3.x.y.uk/home&Reason=-1&APPID=Common&URI=https://dit3.x.y.uk/home
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-GB; rv:1.7.7) Gecko/20050414 Firefox/1.0.3 - -

My proxy settings are:

# =================================================
# Proxy control
# =================================================
ProxyRequests Off
ProxyTimeout 30
ProxyPreserveHost On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>

ProxyPass /ClientObjects !
ProxyPass /ClientScripts !
ProxyPass /images !
ProxyPass /faq !
ProxyPass /js !
ProxyPass /style !
ProxyPass /error !
ProxyPass /server-status !
ProxyPass /heartbeat !

<Location />
ProxyPass http://dit3_bigip_app_vip.x.y.uk:85/
ProxyPassReverse http://dit3_bigip_app_vip.x.y.uk:85/
</Location>

Has anyone come across this issue before??? my concern is that it will cause problems with
log analysis software.

cheers

Steve


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