Page 1 of 1

change htdocs directory

PostPosted: 11. December 2003 11:08
by whacker
can you change the htdocs directory to point to another directory? I tried modifying httpd.conf changing Directory directives to another directory of another drive but it wouldn't work.

PostPosted: 11. December 2003 12:48
by Kristian Marcroft

you have to change the DocumentRoot und the Directory-tags
then it should work.

So long

PostPosted: 12. December 2003 09:03
by whacker
Made the changes in WinXP doesn't work....

PostPosted: 12. December 2003 17:54
by Kristian Marcroft

did you restart Apache after changing the Settings?
If you did, and it didn't work, could you please Paste the PArts of the httpd.conf that you changed?

Please do not Paste the whole httpd.conf, only the Parts you edited.

So long

PostPosted: 13. December 2003 03:48
by whacker
#DocumentRoot "/xampp/htdocs"
DocumentRoot "c:"

#<Directory "/xampp/htdocs">
<Directory "c:">

PostPosted: 13. December 2003 10:48
by Kristian Marcroft

I do not want to affect you, but have you gone crazy?
Why would someone like to have their SystemRoot as DocumentRoot?
Everyone would have Access to all Files on your System.
People could easy open a cmd Box and format your disk etc. pp

But anyways, you should change C: to C:/ then it "should" work.
But don't say we didn't warn you!

So long

there is always a reason

PostPosted: 27. December 2003 00:32
by chanio

Designers don't do things because they like to do them but because they can't do it another way.
The /htdocs folder can be named anything you want but there is a reason for having some folders not reachable from the /htdocs folder... Those folders are not reachable from a web site. Only if someone can physically log in through the command line. Then someone could just cd .. to get to the lower folders.
But if you put the htdocs folder in the lower place, there is no place to hide what you need to hide. That is a passwords folder, some programs and vital data!


PostPosted: 10. September 2008 09:27
by lollielala
Kristian Marcroft wrote:Hi,
did you restart Apache after changing the Settings?

Thanks for that, now I feel silly.
Over an hour spent on this... thanks again

Re: change htdocs directory

PostPosted: 07. November 2013 11:49
by vdhoke
I copied contents of folder "c:/xampp/htdocs"
to "D:/long folder name with spaces/subfolder/htdocs" to enable all includes.
and left the xampp installation in its own place.

Then I changed the DirectoryRoot & <Directory> entries in httpd.conf as documented.
Replaced the original "c:/xampp/htdocs" with my "folder path"
But failed over and over with combinations.

Then I ignored the advise to use a forward slash "/"and used the actual path as normally used on windows.

DocumentRoot "D:\long folder name with spaces\subfolder\htdocs"
<Directory "D:\long folder name with spaces\subfolder\htdocs">

Restart Apache and..

Viola !