Change DocumentRoot

Change DocumentRoot

Post by eome » Tue, 16 May 2006 05:42:52


Hi,

I have installed Apache Http Server 2.2.2 on Windows 2000 Professional.
The default test page works fine. I do have an issue when changing the
DocumentRoot.

The default is:
DocumentRoot "C:/Program Files/Apache Software
Foundation/Apache2.2/htdocs"
and I would like to change it to:
DocumentRoot "C:/htdocs".

I make the change, save the file and restart the server (this all as
user administrator). Howver my test page will not open and I get "You
are not authorized to view this page".

I can't think of anything else to do to fix this other than using the
default (which does work).

Any ideas?

Best regards,
Fred
 
 
 

Change DocumentRoot

Post by Jim Patter » Tue, 16 May 2006 13:08:35

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



There should be an FAQ about this somewhere (I don't know if there is).
Apache's default configuration "locks down" the entire filespace and
then overrides it where needed. You need to change the settings on your
DocumentRoot directory to permit web clients to read it.

Look for a <Directory> directive for your old htdocs directory. If you
change it to point to the new one, it should fix your problem. I expect
it will look something like this:

<Directory "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs">
AllowOverride None
Order allow,deny
Allow from all
</Directory>

Hope this helps!


- --
Jim Patterson
Ottawa, Ont
CANADA
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.yqcomputer.com/

iD8DBQFEZ/7A3pdNyWtIEQoRAjgaAKC4wSSSYg2RROiwN82rbdhJ/ujirQCg5Acq
ZgKqrQnzqNj3a1BOHxr8AhY=
=61av
-----END PGP SIGNATURE-----