linux user group brescia

immagine del castello

Archivio della mailing list

directories apache

Maurizio Paolini paolini a dmf.unicatt.it
Ven 19 Mar 2004 11:22:02 UTC
> From: marco ghidinelli <marcogh a linux.it>
> On Wed, Mar 17, 2004 at 10:55:57AM +0100, Sergio Bevilacqua wrote:
> > 
> > mi succede una cosa strana con un server web...
> > 
> > il server "non capisce" che deve entrare nelle directories. mi spiego:
> > l'indirizzo http://192.167.22.29/YOR/ viene correttamente visualizzato,
> > mentre se ometto l'ultimo slash (http://192.167.22.29/YOR) non entra
> > nella directory, la richiesta fallisce, e io mi ritrovo su google.
> > 
> > c'รจ chiaramente una direttiva sbagliata passata ad apache, ma non
> > capisco quale sia, e ormai sto andando per tentativi.
>

Attenzione: quando un browser richiede un indirizzo mancante
della barra finale (che non sarebbe del tutto corretto) il server
risponde con una versione "canonica" dell'URL, quindi contenente
la barra in fondo.  Il problema e' forse dovuto al fatto che nella
URL di risposta viene inserito anche il nome canonico dell'host,
che e' una direttiva del file di configurazione di apache:

#
# ServerName allows you to set a host name which is sent back to clients for
# your server if it's different than the one the program would get (i.e., use
# "www" instead of the host's real name).
#
# Note: You cannot just invent host names and hope they work. The name you
# define here must be a valid DNS name for your host. If you don't understand
# this, ask your network administrator.
# If your host doesn't have a registered DNS name, enter its IP address here.
# You will have to access it by its address (e.g., http://123.45.67.89/)
# anyway, and this will make redirections work in a sensible way.
#[...]

Questo puo' essere specificato anche a livello dei singoli 
"VirtualHost".

mp



Maggiori informazioni sulla lista Lug