Can I change the root directory

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

Can I change the root directory

Postby rubantin » 30. May 2009 03:22

I installed XAMPP succesfully on my comp. I would like to have a directory on another partition as my root. Can I just reconfigure it? or do i have to reinstall it on the other partition?

Russ
rubantin
 
Posts: 4
Joined: 30. May 2009 03:20

Re: Can I change the root directory

Postby Sharley » 30. May 2009 04:22

rubantin wrote:...Can I just reconfigure it?
Yes, you can just reconfigure it.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Can I change the root directory

Postby rubantin » 30. May 2009 11:52

Sharley wrote:
rubantin wrote:...Can I just reconfigure it?
Yes, you can just reconfigure it.



OK.. do i just nee to modify the httpd.conf file or is there more to it?

Russ
rubantin
 
Posts: 4
Joined: 30. May 2009 03:20

Re: Can I change the root directory

Postby Sharley » 31. May 2009 08:56

Normally you would not need to move or change the DocumentRoot location to achieve many and varied other configurations and uses for XAMPP.

Perhaps if you let us know more details about what you are wanting to do, then we may be able to suggest better alternatives.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Can I change the root directory

Postby rubantin » 31. May 2009 12:37

I want to have all my programs on C: drive and all my data (web pages) on D: drive (D:\web).

I do this so that if my OS goes down I can just wipe and reinstall the OS.

Russ
rubantin
 
Posts: 4
Joined: 30. May 2009 03:20

Re: Can I change the root directory

Postby Sharley » 31. May 2009 13:02

rubantin wrote:I want to have all my programs on C: drive and all my data (web pages) on D: drive (D:\web).

I do this so that if my OS goes down I can just wipe and reinstall the OS.
Thats all possible using the xampp\apache\conf\extra\httpd-vhosts.conf file where you can designate Virtual Hosts for each of your web sites and their respective files (pages) in the D:\web\ folder without interfering or disturbing the default XAMPP installation configuration - it is what I do only on the E:\home folder with over 20 web sites and their folders and files and they all work perfectly well without interfering with the default web pages of XAMPP.

This method keeps all your default installation XAMPP pages in the C:\xampp\htdocs folder which would be reinstalled anyway if you had this hypothetical going down of the OS and also allows you to expand by adding more web sites when ever you wish.

An advanced search in the XAMPP for Windows forum for virtualhosts or vhosts will return many working examples for you to experiment with or if you decide to have a go and you don't quite get it right first time then by all means feel free to paste your httpd-vhosts.conf file here so it can be looked at and correction recommendations offered..
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 64 guests

cron