How to change xampp localhost to another folder ( outside xampp folder)?

前端 未结 9 1984
闹比i
闹比i 2020-12-01 01:03

How can I change my default xampp localhost c:xampp/htdoc to another folder i.e. c:/alan? When I use the IP address I should be able to view my we

9条回答
  •  无人及你
    2020-12-01 01:56

    I had to change both the httpd.conf and httpd-ssl.conf files DocumentRoot properties to get things like relative links (i.e. href="/index.html") and the favicon.ico link to work properly.

    The latest Xampp control Panel makes this pretty easy.

    From the control panel, there should be Apache in the first row. If it's started, stop it. Then click config and open the httpd.conf file and search for htdocs or documentRoot. Change the path to what you like. Do the same for httpd-ssl.conf. These should be the top 2 files in the list under Config's dropdown.

    Then start the server again.

    Hope this helps someone. Cheers.

提交回复
热议问题