httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chip Turner <ctur...@redhat.com>
Subject Re: Directory completion?
Date Tue, 01 Jan 2002 03:27:45 GMT
"William A. Rowe, Jr." <wrowe@covalent.net> writes:

> > On Mon, Dec 31, 2001 at 05:36:22PM -0600, Austin Gonyou wrote:
> > > If I add a directory to my httpd.conf and restart apache, or I add a
> > > directory to htdocs, then point my browser as such:
> > > 
> > > http://127.0.0.1/somedir
> > > 
> > > It hangs until the browser times out. If I do the following though,
> > > without restarting apache, etc:
> > 
> > My guess is your ServerName is set to something that doesn't exist from
> > the perspective of your browser. When you request http://127.0.0.1/somedir
> > it generates a 301 Moved Permanently to whatever was in your ServerName
> > (plus the path and some other stuff), at which point your browser tries
> > to resolve that new host. If it cannot it will hang until timeout.
> 
> Yes... definately the problem [it bit me just today.]
> 
> What would the group think about validating that the ServerName/ServerAlias
> directives resolve to a valid Listen'er of this server?

Why not base the redirect on the incoming Host: header?  That should
work in most cases (certainly for the browser, also should work for
proxies in front).  This way users don't mysteriously hop servers and
such.  In cases where there is no Host, perhaps fallback to the vhost
ServerName.

Chip

-- 
Chip Turner                   cturner@redhat.com
                              Red Hat Network

Mime
View raw message