httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stormy <storm...@stormy.ca>
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 <stormy22@stormy.ca> 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 
>>restart):
>>
>>  * 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 127.0.0.0 (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:

NameVirtualHost 192.168.0.90:80
<VirtualHost 192.168.0.90:80>
# <VirtualHost 127.0.0.1:80 192.168.0.90:80>
        #Basic setup
        ServerAdmin abuse@stormy.ca
        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
        </Directory>
</VirtualHost>

I just rem'd out all the "NameVirtualHost 192.168.0.90:80" 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 192.168.0.90:80 overlaps with VirtualHost 
192.168.0.90:80, the first has precedence, perhaps you need a 
NameVirtualHost directive

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

We're using "names" for a single IP / port (192.168.0.90:80), 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

[snip]
>--
>   Mark Montague
>   mark@catseye.org


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