www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From William Sommers <somm...@sfo.com>
Subject Re: general/704: VirtualHost relative paths are being over-ridden by global Alias paths
Date Mon, 23 Jun 1997 09:14:11 GMT
On Sun, 22 Jun 1997 22:29:24 -0700 (PDT)  dgaudet@hyperreal.com wrote:

 > Synopsis: VirtualHost relative paths are being over-ridden by global
 > Alias paths
 >
 > State-Changed-From-To: open-feedback
 > State-Changed-By: dgaudet
 > State-Changed-When: Sun Jun 22 22:29:23 PDT 1997
 > State-Changed-Why:
 > I'm really confused.  What you've described is exactly how Alias is
 > supposed to work.  If you set it globally outside of all servers
 > then it affects all of them ... You're saying 1.1 behaved differently?
 > What did it do?
 >
 > Dean

Let's see if I can briefly clarify...

If I've defined in srm.conf

 Alias /images/ /var/www/images/

then I would expect any reference, anywhere on the server (VirtualHost or 
otherwise) to <SRC="/images/whatever.jpg"> to indeed expand and use file 
/var/www/images/whatever.jpg

However, if we leave off the preceding "/", <SRC="images/whatever.jpg">, 
the alias should no longer be expanded, because this is a *relative* path, 
relative to the current working directory (aka "./images/whatever.jpg").

This is how it has worked in all Apache versions <= 1.1.3 I've ever used.

In 1.2, however, I am still seeing the expected behavior in UserDir 
hierarchies (http://www.sfo.com/~user = ~user/public_html), but within 
<VirtualHost> hierarchies

 DocumentRoot /usr/home/user/public_html

even relative references are being expanded by the global Alias 
definition.  If we call up the same exact VirtualHost site using the 
~user/public_html URL format (physical location is identical), all works 
as expected.

(Note that I am not referring to an Alias defined within a <VirtualHost> 
block -- the Alias is defined only in srm.conf.)

In other words, I would expect that

  <SRC="/images/whatever.jpg">
  <SRC="images/whatever.jpg">

would point to two diffent places, but they do not.  This is happening 
*only* within <VirtualHost>s and is definitely a change from previous 
behavior.  (Believe me, since we've always instructed folks to use 
relative paths here, this affected many sites and we began hearing from 
these VirtualHost customers within hours of the switchover.)

It is very easy to reproduce (at least here in our environment): 

 - simply map a <VirtualHost> onto an existing UserDir site, and add
   an srm.conf Alias with the same name as a uniquely-named
   subdirectory within the site

 - <SRC="subdirectory/file"> will pull up just fine from an html
   reference when the site is called by UserDir URL, but will fail
   (in attempt to find expanded <SRC="/subdirectory/file">) if called
   up by VirtualHost URL.

If need be, I can set up a test site here to demonstrate.


 William Sommers
 San Francisco Online
 Televolve, Inc.
 sommers@sfo.com



Mime
View raw message