Page 1 of 1

Changing the root directory

PostPosted: 24. February 2009 00:03
by TheREALCyberGonzo
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 ?

Re: Changing the root directory

PostPosted: 24. February 2009 00:13
by Izzy
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.