I understand that the root of xampp is the htcdocs directory - but I want to create my own directory in my home folder and have that server as my root so that I don't have to go through a million folders开发者_高级运维 to save a file.
I can accomplish this using a symbolic link, but is there a better way to do this????
Thanks so much.
You'll need to edit your httpd.conf file and the restart the server. There should be two things you'll need to replace: the DocumentRoot={current} and a . Just replace the existing path with the path you'd like it to be and restart apache. It should now be serving from the new directory instead of the old one.
You can also use virtual hosts to assign the directory in your home folder to a new domain/ipaddress/port/whatever, but that's quite a bit harder to do.
You can use following link to create Virtual Host - http://www.mikebernat.com/blog/Adding_Virtual_Hosts_to_Apache_&_Wampserver
Although this is for WAMP. Same information can be used for XAMP
精彩评论