httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stormy <>
Subject Re: [users@httpd] Virtual hosts
Date Wed, 30 Nov 2011 20:16:39 GMT
At 02:36 PM 11/30/2011 -0500, Mark Montague wrote:
>On November 30, 2011 14:16 , Stormy <> wrote:
>>Just finished setting up a new server (Ubuntu 11.10) and copied/pasted 
>>all conf files for Apache2 from an older fully functional server (Ubuntu 
>>10.04). All the virtual hosts are functioning, but on apache2 restart I 
>>get the following warning (the old server gives no warnings, just a clean 
>>  * Restarting web server 
>> apache2                                                [Wed Nov 30 
>> 14:02:12 2011] [error] (EAI 2)Name or service not known: Failed to 
>> resolve server name for (check DNS) -- or specify an explicit 
>> ServerName
>Do you have a ServerName directive in every one of your virtual hosts?
>Does each one specify a valid, fully qualified domain name?

All virtual hosts directives are separate files in 
etc/apache2/sites-available. All are identical (+/- name/docroot and 
directory), as in:

# <VirtualHost>
        #Basic setup
        ServerName stormy
         ServerAlias *.stormy
        DocumentRoot /mnt/www/stormy

        <Directory /mnt/www/stormy>
                 Order Deny,Allow
                 Allow from all
                 # Don't show indexes for directories
                 Options -Indexes

I just rem'd out all the "NameVirtualHost" and now the 
warning has changed to:

paul@nelson:/etc/apache2/sites-available$ sudo /etc/init.d/apache2 restart
  * Restarting web server 
apache2                                                [Wed Nov 30 15:02:51 
2011] [warn] VirtualHost overlaps with VirtualHost, the first has precedence, perhaps you need a 
NameVirtualHost directive

>>[Wed Nov 30 14:02:12 2011] [warn] NameVirtualHost has no 
>>[Wed Nov 30 14:02:12 2011] [warn] NameVirtualHost has no 
>It seems like you have a "NameVirtualHost" directive in one 
>of your configuration files.  Do you have virtual hosts are assigned IP 

We're using "names" for a single IP / port (, LAN only, 
hosts file, not DHCP

>If not, then remove this NameVirtualHost directive to fix the 
>warning.   Or, if you have a missing virtual host, then copy it's 
>configuration from the old server to the new server.

There's nothing on the "old" server, but I'm getting the impression 
(perhaps way off-track) that I need an "umbrella" virtual host in the 
server's name (nelson).  How would I set that up, if needed?

Again, tnx - paul

>   Mark Montague

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message