change htdocs directory

Problems with the Windows version of XAMPP, questions, comments, and anything related.

change htdocs directory

Postby whacker » 11. December 2003 11:08

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.
whacker
 
Posts: 6
Joined: 11. December 2003 10:59

Postby Kristian Marcroft » 11. December 2003 12:48

Hi,

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

So long
KriS
User avatar
Kristian Marcroft
AF Moderator
 
Posts: 2962
Joined: 03. January 2003 12:08
Location: Diedorf

Postby whacker » 12. December 2003 09:03

Made the changes in WinXP doesn't work....
whacker
 
Posts: 6
Joined: 11. December 2003 10:59

Postby Kristian Marcroft » 12. December 2003 17:54

Hi,

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
KriS
User avatar
Kristian Marcroft
AF Moderator
 
Posts: 2962
Joined: 03. January 2003 12:08
Location: Diedorf

Postby whacker » 13. December 2003 03:48

#DocumentRoot "/xampp/htdocs"
DocumentRoot "c:"

#<Directory "/xampp/htdocs">
<Directory "c:">
whacker
 
Posts: 6
Joined: 11. December 2003 10:59

Postby Kristian Marcroft » 13. December 2003 10:48

Hi,

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
KriS
User avatar
Kristian Marcroft
AF Moderator
 
Posts: 2962
Joined: 03. January 2003 12:08
Location: Diedorf

there is always a reason

Postby chanio » 27. December 2003 00:32


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!

:lol:
Gallactic Firewall
User avatar
chanio
 
Posts: 72
Joined: 18. March 2003 22:05
Location: Argentina

Postby lollielala » 10. September 2008 09:27

Kristian Marcroft wrote:Hi,
did you restart Apache after changing the Settings?
KriS


Thanks for that, now I feel silly.
Over an hour spent on this... thanks again
s t a r t s l o w , t h e n f a d e o u t
lollielala
 
Posts: 5
Joined: 26. July 2008 08:15

Re: change htdocs directory

Postby vdhoke » 07. November 2013 11:49

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">
</Directory>

Restart Apache and..

Viola !
vdhoke
 
Posts: 5
Joined: 15. September 2013 08:07
XAMPP Version: 5.5.19
Operating System: Windows 7


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 46 guests