how to move the document root

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

how to move the document root

Postby carsten888 » 16. December 2018 09:13

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.
carsten888
 
Posts: 18
Joined: 16. December 2018 09:05
XAMPP version: 7.3.0
Operating System: windows 10

Re: how to move the document root

Postby Altrea » 16. December 2018 09:50

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
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 9567
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: how to move the document root

Postby carsten888 » 16. December 2018 14:00

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:.
carsten888
 
Posts: 18
Joined: 16. December 2018 09:05
XAMPP version: 7.3.0
Operating System: windows 10

Re: how to move the document root

Postby Altrea » 16. December 2018 14:08

Why do you configure drive letter e?
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 9567
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: how to move the document root

Postby carsten888 » 16. December 2018 14:10

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?
carsten888
 
Posts: 18
Joined: 16. December 2018 09:05
XAMPP version: 7.3.0
Operating System: windows 10

Re: how to move the document root

Postby carsten888 » 16. December 2018 14:11

Altrea wrote:Why do you configure drive letter e?

that was a typo. Its D, not E. sorry about the confusion.
carsten888
 
Posts: 18
Joined: 16. December 2018 09:05
XAMPP version: 7.3.0
Operating System: windows 10

Re: how to move the document root

Postby carsten888 » 16. December 2018 14:30

I don't know why but after 5 or so restarts it started working.
thanks.
solved
carsten888
 
Posts: 18
Joined: 16. December 2018 09:05
XAMPP version: 7.3.0
Operating System: windows 10

Re: how to move the document root

Postby kasemo » 18. December 2018 23:32

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.
kasemo
 
Posts: 6
Joined: 12. December 2018 16:17
XAMPP version: 7.2.3
Operating System: Windows 10

Re: how to move the document root

Postby Altrea » 19. December 2018 00:06

What is the point of using symlinks for DocumentRoot?
I don't see any advantages.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 9567
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: how to move the document root

Postby kasemo » 08. January 2019 22:42

Laziness.

Access to directories outside the serverroot without the need for alternate config / setting up perms / etc.
kasemo
 
Posts: 6
Joined: 12. December 2018 16:17
XAMPP version: 7.2.3
Operating System: Windows 10

Re: how to move the document root

Postby Nobbie » 11. January 2019 20:42

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....
Nobbie
 
Posts: 10796
Joined: 09. March 2008 13:04


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 61 guests