You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Yogish Baliga <ba...@gmail.com> on 2008/04/04 11:00:13 UTC

[users@httpd] apache remote host/ip is not logged in access log file

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: [users@httpd] apache remote host/ip is not logged in access log file

Posted by Yogish Baliga <ba...@gmail.com>.
On Fri, Apr 4, 2008 at 2:10 AM, Narendra Verma <na...@impetus.co.in>
wrote:

>  Hi;
>
>
>
> Use this
>
>
>
> *   LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\"
> \"%{User-Agent}i\"" combined*
>
>
Already tried %h instead of %a. That does not work either. I did run gdb on
apache process and inspected request object.

request_rec->connection->remote_ip is set to "::".

Here is more information on httpd.worker -V

Server version: Apache/2.0.59
Server built:   Jul 28 2006 00:20:28
Server's Module Magic Number: 20020903:12
Server loaded:  APR 0.9.13, APR-UTIL 0.9.13
Compiled using: APR 0.9.12, APR-UTIL 0.9.12
Architecture:   32-bit
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/worker"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D HTTPD_ROOT="/etc/httpd"
 -D SUEXEC_BIN="/usr/sbin/suexec"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"


-- baliga

>
>
> In place of
>
>
>
> LogFormat "%a %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"
> %D" combined
>
>
>
> Thanks
>
> Narendra Verma
>
>
>
> -----Original Message-----
> *From:* Yogish Baliga [mailto:baliga@gmail.com]
> *Sent:* Friday, April 04, 2008 2:30 PM
> *To:* users@httpd.apache.org
> *Subject:* [users@httpd] apache remote host/ip is not logged in access log
> file
>
>
>
> 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: [users@httpd] apache remote host/ip is not logged in access log file

Posted by Narendra Verma <na...@impetus.co.in>.
Hi;

 

Use this 

 

   LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\""
combined

 

In place of 

  

LogFormat "%a %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %D"
combined



 

Thanks 

Narendra Verma

 

-----Original Message-----
From: Yogish Baliga [mailto:baliga@gmail.com] 
Sent: Friday, April 04, 2008 2:30 PM
To: users@httpd.apache.org
Subject: [users@httpd] apache remote host/ip is not logged in access log
file

 

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