Changing the root directory

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

Changing the root directory

Postby TheREALCyberGonzo » 24. February 2009 00:03

Hi,

I have installed XAMP successfully and it's looking great.

Instead of copying my site to /htdocs/ I would like http://localhost to point to my website that is located somewhere else on my HD.
This way I can manage it better, for version control, and there's also the issue that I have multiple sites.

I hoped I could change the path by changing doc_root in php.ini (and restart Apache) but that doesn't seem to work.

I'm a novice ... any advice you can give is appreciated.

It would be nice if I could, relatively flexible, change this root so that I can test multiple sites offline (on my HD) without having to copy the actual sites constantly to /xampp/htdocs/ .
Is this possible and how ?
TheREALCyberGonzo
 
Posts: 1
Joined: 23. February 2009 23:56

Re: Changing the root directory

Postby Izzy » 24. February 2009 00:13

First I would revert all your changes to the defaults that were in place when you installed XAMPP.

Then because you want to use multiple sites I would recommend you use virtualhost configurations in the xampp\apache\conf\extra\httpd-vhosts.conf file.

A forum search for vhosts or virtualhost will give you plenty of detail to work with and many working examples.

If you get stuck at any stage with your vhosts attempts then please paste here your httpd-vhosts.conf file and your error messages, if any, so it/they can be checked out.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 71 guests