0

I want to stop apache2 from querying the dns name at every start and to make it faster. There is absolutely no reason for apache to do any DNS-queries at all. For redirects it has to use the name passed in by the client in the host header. (See http://httpd.apache.org/docs/2.2/mod/core.html#usecanonicalname )

This is for an embedded device btw and if I expose the hostname setting in the gui I better have a good reason to do so and can explain 100% what is affected by it!

So far I only see that the hostname is used by apache for nothing and it is but into the syslog.

I don't use http://httpd.apache.org/docs/2.2/mod/core.html#hostnamelookups or dns name based access rules. For more background about my problem, see http://httpd.apache.org/docs/2.2/dns-caveats.html . There it says:

To get this address it uses either the global ServerName (if present) or calls the C function gethostname (which should return the same as typing "hostname" at the command prompt). Then it performs a DNS lookup on this address. At present there is no way to avoid this lookup.

1 Answer 1

2

HostnameLookups (part of core - Apache HTTP Server). It should be Off by default though.

and localhost also should be part of your /etc/hosts by default

[root@wcmisdlin02 ~]# grep -c localhost /etc/hosts 2 [root@wcmisdlin02 ~]# 
2
  • Thanks! But that's not what I meant. I don't use HostnameLookups. I should have added the link with background information ( httpd.apache.org/docs/2.2/dns-caveats.html ) earlier! Commented Jan 16, 2013 at 23:34
  • I guess you should make sure that whichever hostname you're using is resolvable through DNS or if you don't want to use DNS then put it into hosts, localhost IS already part of it, so you don't need to do that one. Commented Jan 17, 2013 at 18:00

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.