Page 1 of 1

how to move the document root

PostPosted: 16. December 2018 09:13
by carsten888
from C:/xxamp/htdocs
to
C:/_websites/

I tried edditting httpd.conf on 2 places:
DocumentRoot "E:/_websites"
<Directory "E:/_websites">

but then when restarting it wont run.

Re: how to move the document root

PostPosted: 16. December 2018 09:50
by Altrea
What type of drive is e? HDD? USB? network share?
How about some log outputs?
Please start here reading carefully: [Q&A] Insufficient debug information - Apache starting issue

Re: how to move the document root

PostPosted: 16. December 2018 14:00
by carsten888
my laptop got 2 ssd-s. Windows and apps are on C:, docs and website files and database (and everything else which need backupping regularly) is on D:.

Re: how to move the document root

PostPosted: 16. December 2018 14:08
by Altrea
Why do you configure drive letter e?

Re: how to move the document root

PostPosted: 16. December 2018 14:10
by carsten888
oops. Turns out I made a typo in httpd.conf. I corrected it and now it does not stop working, but does not display the new default pafe when I go to 'localhost'. Just the default http://localhost/dashboard/

What am I overlooking here?

Re: how to move the document root

PostPosted: 16. December 2018 14:11
by carsten888
Altrea wrote:Why do you configure drive letter e?

that was a typo. Its D, not E. sorry about the confusion.

Re: how to move the document root

PostPosted: 16. December 2018 14:30
by carsten888
I don't know why but after 5 or so restarts it started working.
thanks.
solved

Re: how to move the document root

PostPosted: 18. December 2018 23:32
by kasemo
FYI - something I do locally is build symbolic links, dump them in my directory. For a localhost XAMPP (non-public-facing), it's perfectly fine.

Yes, you read that right. Symbolic links on Windows. It supports them.

I wouldn't do this if your system were facing outwards:

mklink /D your_dir_name_in_webroot c:\wherever\you\want\

So technically - you can delete your htdocs, then do this:

cd c:\xampp
mklink /D htdocs C:/_websites/

And now you have a symbolic link to that new webroot.

Re: how to move the document root

PostPosted: 19. December 2018 00:06
by Altrea
What is the point of using symlinks for DocumentRoot?
I don't see any advantages.

Re: how to move the document root

PostPosted: 08. January 2019 22:42
by kasemo
Laziness.

Access to directories outside the serverroot without the need for alternate config / setting up perms / etc.

Re: how to move the document root

PostPosted: 11. January 2019 20:42
by Nobbie
kasemo wrote:Laziness.

Access to directories outside the serverroot without the need for alternate config / setting up perms / etc.


is it really so incredibly much more work to enter the "alias folder" in a file than the command "mklink folder" in a terminal? Doesn't really sound very credible....