httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ota mares" <>
Subject [users@httpd] Apache/2.2.9, Windows XP/Vista, Relative paths do work, but why?
Date Tue, 24 Jun 2008 13:19:13 GMT

i am currently toying around with my own local WAMP installation and
found out that though everyone tells me relative directory and alias
paths do not work, they DO work!
Unfortunately i am unable to find any information on that behaviour so
that's why i am turning to the mailing list :-)

The whole project can be downloaded from the following URI and i
recommend to take a look at it for easier understanding.

The functionality is pretty simple, apache-start.bat calls the
httpd.exe with the -d and -c config parameters.
The serverroot will be set to the current working directory, the most
upper directory of the whole project, so if you assume the whole
project is in "C:/LDE-0.6.0/" the serverrot gets set to
"C:/LDE-0.6.0/" ;)

All paths are setup to be relative to that directory. And here is the
clue, even relative directory directives work. Check out line 193 to
198 of the apache.conf in the "configuration/" dir. It clearly allows
access to the default documentroot and shows the directory listing
when you visit http://localhost.

<Directory "srv/www/localhost/">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all

Another validation is that icons in the directory listings work, look
at the autoindex.conf in the "configuration/apache/" directory. All
paths are relative even the alias directive.

The last testcase would be to call http://localhost/~phptest/ which
shows up the phpinfo. All directory calls with a tilde will be routed
to another docroot via an aliasmatch directive to avoid host file

I tested it on two machines Windows XP and Vista and it allways worked.

If you download my test project you can easily confirm that everything
works as i wrote here. To start the server, simply unpack it anywhere
you want and doubleclicke the apache-start.bat.

I assume that the paths get appended to the serverroot but the
documentation explicitly says that directory directives have to be
Please, could anyone explain then to me why it works or if i made an
error somewhere or simply i am just plain stupid to read the docs? :-)

Before anyone misunderstands me, i am glad it works that way, this
behaviours saves me to parse and create tmp config files, i just would
like to know why!

Thanks & Regards

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message