You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Andy Canfield <an...@yandex.com> on 2014/05/09 12:58:40 UTC

Re: [users@httpd] VirtualHost core error

I get an error message, apparently from Apache.

The error message appears briefly on the screen, and then disappears due
to the login prompt. It does NOT appear in any log file. IMHO this is
VERY bad form.  I captured it by the crude technique of rebooting ten
times and using a camera to photograph the actual screen each time. What
I photographed was this error message:

/[Fri May 09 16:44:20.639207 2014] [core error] [pid 1152] (EAI 2) Name
or service not known: AH00547: Could not resolve host name
andycanfield.com -- ignoring!/

It appears to refer to these lines in one of my sites-available
configuration files:
<VirtualHost andycanfield.com:80>
        DocumentRoot /www/andycanfield/Site
</VirtualHost>

I do not see what is wrong with these lines. What they mean to me is "If
you ever receive a request for web site "andycanfield.com", look at the
web pages located in /www/andycanfield/Site. Of course
"andycanfield.com" is not in /etc/hosts, why should it be? Why should
apache2 look for it during startup?

I added "ServerName andycanfield.com" in front of the DocumentRoot
statement and it still gies me that error.

There is another statement like this:
<VirtualHost www.andycanfield.com:80>
        DocumentRoot /www/andycanfield/Site
</VirtualHost>
And I get another error message about "www.andycanfield.com" also.

Indeed there is another statement like this:
<VirtualHost andycanfield:80>
        DocumentRoot /www/andycanfield/Site
</VirtualHost>
But this name "andycanfield" is defined as "127.0.0.1" in /etc/hosts,
and apache2 does not complain about it.

What am I doing? I am writing a config file that can be used either on
my personal computer or on the Internet server. "andycanfield" is for my
personal computer; "andycanfield.com" is for the server. Do I need two
configuration files, one for my notebook and one for the server on the
Internet?

By the way I am having frequent problems with configurations that worked
fine under apache 2.2 but fail under 2.4. This is but one example. The
entire "403: Forbidden" problem was another.