开发者

How do I create an alternative root for XAMPP?

开发者 https://www.devze.com 2023-04-11 01:38 出处:网络
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 fol

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号