[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: virtual host con apache



Roberto wrote:
> Non capisco, qualche mese fa ho preso appunti su come creare i virtual
> host con apache ma adesso, provando con la versione 2.0.52 di apache non
> riesco a raggiungere il sito; ed in particolare ho un errore del tipo:
> 
> Forbidden.
> 
> You don't have permission to access / on this server.
> 
> ho aggiunto nel client e nel server le seguenti righe su /etc/hosts
> 
> 192.168.1.57    www.utentesito1.it
> 
> su httpd.con ho creato il mio virtual host:
> 
> <VirtualHost www.utentesito1.it>
>     ServerAdmin pippo@pippero.net
>     DocumentRoot /home/utentesito1
>     ServerName www.utentesito1.com
>     #ErrorLog /home/utentesito1/log/error.log
>     #CustomLog /home/utentesito1/log/access.log common
> </VirtualHost>

Secondo me sbagli quel "www.utentesito1.it" accanto a VirtualHost

Nel file di configurazione di apache2 (/etc/apache2/apache2.conf)
dovresti avere una riga con
NameVirtualHost *:80
in cui specifichi che l'identificazione dei virtual è basata sull'header
http "Host:", e che tutte le connessioni avvengono su tutte le
interfacce disponibili e sulla porta tcp 80

La stessa stringa "*:80" deve essere riportata in tutte le definizioni
di virtualhost:

VirtualHost *:80>
	ServerName	www.utentesito1.it
	ServerAdmin pippo@pippero.net
	DocumentRoot /home/utentesito1
	...
</VirtualHost>

Spero d esserti stato d'aiuto,
Syneus.
-- 
Andrea Berardi aka Syneus
Linux Registered User #395193
http://counter.li.org/



Reply to: