Remote IP address not getting logged

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
Yogish Baliga [ Fr, 04 April 2008 10:31 ] [ ID #1935557 ]

Re: Remote IP address not getting logged

"Yogish Baliga" <baliga [at] gmail.com> wrote in message
news:5360160d-da03-4711-91c4-cd8062767c50 [at] 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.
phantom [ Fr, 04 April 2008 11:06 ] [ ID #1935558 ]

Re: Remote IP address not getting logged

On Apr 4, 2:06=A0am, "phantom" <nob... [at] blueyonder.invalid> wrote:
> "Yogish Baliga" <bal... [at] gmail.com> wrote in message
>
> news:5360160d-da03-4711-91c4-cd8062767c50 [at] 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 "::"
Yogish Baliga [ Sa, 05 April 2008 06:52 ] [ ID #1936186 ]

Re: Remote IP address not getting logged

"Yogish Baliga" <baliga [at] gmail.com> schreef in bericht
news:5360160d-da03-4711-91c4-cd8062767c50 [at] 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
HansH [ Sa, 05 April 2008 13:13 ] [ ID #1936189 ]
Webserver » alt.apache.configuration » Remote IP address not getting logged

Vorheriges Thema: directory display options
Nächstes Thema: Disable public access