[Linuxtrent] Re: apache2 avvio e riavvio

  • From: Flavio Stanchina <flavio@xxxxxxxxxxxxx>
  • To: linuxtrent@xxxxxxxxxxxxx
  • Date: Sun, 06 Jul 2008 11:32:23 +0200

mattruffoni@xxxxxxxxx wrote:
> apache2: Could not reliably determine the server's fully qualified domain 
> name, using 127.0.0.1 for ServerName
> [Fri Jul 04 18:11:49 2008] [warn] NameVirtualHost 192.168.0.3:0 has no 
> VirtualHosts

Leggere con cura i messaggi di solito aiuta. Apache ti sta dicendo che non
riesce a determinare il nome completo della macchina e ti sta dicendo anche
di aver usato il valore 127.0.0.1 come parametro per la direttiva
ServerName. Quindi andiamo a vedere la documentazione di ServerName:
  http://httpd.apache.org/docs/2.2/mod/core.html#servername

La frasetta interessante per il nostro problema è la seguente:
  If no ServerName is specified, then the server attempts to deduce
  the hostname by performing a reverse lookup on the IP address.

Prova che cosa risponde il comando
  host 192.168.0.3

Se non riesce a risolvere un nome decente, devi mettere il nome della
macchina in /etc/hosts oppure devi configurare correttamente il DNS della
tua rete interna; al limite prova con ServerName 192.168.0.3 che dovrebbe
funzionare sia da locale che dalle altre macchine in rete.

Aggiungere una direttiva NameVirtualHost secondo me non serve, è
sufficiente il NameVirtualHost * già presente nella config standard.

-- 
Ciao, Flavio

Those who do not understand Unix are condemned to reinvent it, poorly.
-- Henry Spencer
-- 
Per iscriversi  (o disiscriversi), basta spedire un  messaggio con OGGETTO
"subscribe" (o "unsubscribe") a mailto:linuxtrent-request@xxxxxxxxxxxxx


Other related posts: