Remote IP address not getting logged

Remote IP address not getting logged

am 04.04.2008 10:31:55 von Yogish Baliga

Hello all,

My configuration look like this:

LogFormat "%a %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i
\" %D" combined
CustomLog "|/usr/sbin/rotatelogs /home/y/logs/httpd/access_log-%Y-%m-
%d-%H 3600" combined

This is not logging the remote ip address, instead is logged as "::"
as follows:

:: - - [04/Apr/2008:01:23:40 -0700] "GET /status.html HTTP/1.0" 404
296 "-" "-" 203
:: - - [04/Apr/2008:01:23:40 -0700] "GET /status.html HTTP/1.0" 404
296 "-" "-" 107

Any clue on what configuration change required?

I am running httpd-2.0.59 on RHEL4.

Other configuration parameters:

ServerName localhost
Listen 8081
HostnameLookups off

Thanx,
-- baliga

Re: Remote IP address not getting logged

am 04.04.2008 11:06:34 von phantom

"Yogish Baliga" wrote in message
news:5360160d-da03-4711-91c4-cd8062767c50@s8g2000prg.googleg roups.com...
> Hello all,
>
> My configuration look like this:
>
> LogFormat "%a %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i
> \" %D" combined
> CustomLog "|/usr/sbin/rotatelogs /home/y/logs/httpd/access_log-%Y-%m-
> %d-%H 3600" combined
>
> This is not logging the remote ip address, instead is logged as "::"
> as follows:
>
> :: - - [04/Apr/2008:01:23:40 -0700] "GET /status.html HTTP/1.0" 404
> 296 "-" "-" 203
> :: - - [04/Apr/2008:01:23:40 -0700] "GET /status.html HTTP/1.0" 404
> 296 "-" "-" 107
>
> Any clue on what configuration change required?
>
> I am running httpd-2.0.59 on RHEL4.
>
> Other configuration parameters:
>
> ServerName localhost
> Listen 8081
> HostnameLookups off
>

As you have hostname lookups switched off, try %h instead of %a.

Re: Remote IP address not getting logged

am 05.04.2008 06:52:26 von Yogish Baliga

On Apr 4, 2:06=A0am, "phantom" wrote:
> "Yogish Baliga" wrote in message
>
> news:5360160d-da03-4711-91c4-cd8062767c50@s8g2000prg.googleg roups.com...
>
>
>
> > Hello all,
>
> > =A0My configuration look like this:
>
> > LogFormat "%a %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i
> > \" %D" combined
> > CustomLog "|/usr/sbin/rotatelogs /home/y/logs/httpd/access_log-%Y-%m-
> > %d-%H 3600" combined
>
> > This is not logging the remote ip address, instead is logged as "::"
> > as follows:
>
> > :: - - [04/Apr/2008:01:23:40 -0700] "GET /status.html HTTP/1.0" 404
> > 296 "-" "-" 203
> > :: - - [04/Apr/2008:01:23:40 -0700] "GET /status.html HTTP/1.0" 404
> > 296 "-" "-" 107
>
> > Any clue on what configuration change required?
>
> > I am running httpd-2.0.59 on RHEL4.
>
> > Other configuration parameters:
>
> > ServerName localhost
> > Listen 8081
> > HostnameLookups off
>
> As you have hostname lookups switched off, try %h instead of %a.

Tried that.. but no luck... Some how request_rec->connection-
>remote_ip is being set to "::"

Re: Remote IP address not getting logged

am 05.04.2008 13:13:54 von HansH

"Yogish Baliga" schreef in bericht
news:5360160d-da03-4711-91c4-cd8062767c50@s8g2000prg.googleg roups.com...
> LogFormat "%a %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i
> \" %D" combined
> CustomLog "|/usr/sbin/rotatelogs /home/y/logs/httpd/access_log-%Y-%m-
> %d-%H 3600" combined
>
> This is not logging the remote ip address, instead is logged as "::"
> as follows:
> :: - - [04/Apr/2008:01:23:40 -0700] "GET /status.html HTTP/1.0" 404
> 296 "-" "-" 203
> :: - - [04/Apr/2008:01:23:40 -0700] "GET /status.html HTTP/1.0" 404
> 296 "-" "-" 107
>
Those colons make me wonder about IPv6-ish conflicts.
Try http://kbase.redhat.com/faq/FAQ_45_5360.shtm

Just 2cnt

HansH