httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leif W" <warp-...@usa.net>
Subject Re: [users@httpd] HostnameLookups Off yet hostnames being logged
Date Thu, 16 Oct 2003 21:46:06 GMT
----- Original Message ----- 
From: "Joshua Slive" <joshua@slive.ca>
To: <users@httpd.apache.org>
Sent: Thursday, October 16, 2003 5:22 PM
Subject: Re: [users@httpd] HostnameLookups Off yet hostnames being logged


> On Thu, 16 Oct 2003, Leif W wrote:
> > I assume that the stuff after the # is ignored.
>
> Nope.  Line-ending comments are not allowed in httpd.conf.  Apache should
> warn about them in recent versions.  See:
> http://httpd.apache.org/docs-2.0/configuring.html#syntax

Ahh, so I see now.  Thanks for the pointer.  Another way of stating it is
that only whitespace or other #s may precede a # to the beginning of the
line.

But I have come across at least one case where I can throw a # after a
directive, and have it not complain with a configtest, which seems counter
to the documentation and your comment.  Could this be considered some sort
of configtest bug?

DirectoryIndex index.html index.php # index.htm

When I simply renamed the index.html to index.htm, the page was in fact
displayed, along with this odd error message, repeated 4 times.

[Thu Oct 16 17:37:07 2003] [error] [client 192.168.1.103] Request exceeded
the limit of 10 subrequest nesting levels due to probable confguration
error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use
'LogLevel debug' to get a backtrace.

> > But I'm guessing that in
> > order to figure out the allow status, the IP address's hostname is
looked
> > up?  Is this correct?
>
> Only if the allow/deny directive includes a host/domain name (or something
> apache thinks is a host/domain name).  If the allow/deny includes only IP
> addresses, no lookup is performed.

Ok, this makes sense.  It does a lookup only when it wants to find the IP
address.  If it has an address, it doesn't try to lookup a hostname, as
there may very well be more than one anyways.

> > And then since Apache has this hostname available, it
> > just deices to use it in the logfiles?  Is there any way to completely
> > disable hostnames in logfiles, and just use the IP only?  Say for
example I
> > actually want all IP addresses in my logs, and not intermixed hostnames
and
> > IPs.
>
> Sure.  Just replace the %h in your log format with %a.

Ahh, simple enough.  :)  Right in the log format string.  Thanks for
clarifying.

> Joshua.

Leif



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