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


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 website file in C:/alan.

Thanks for helping me.

This question is tagged with localhost document-root

~ Asked on 2012-01-13 07:46:21

The Best Answer is


Edit the httpd.conf file and replace the line DocumentRoot "/home/user/www" to your liked one.

The default DocumentRoot path will be different for windows [the above is for linux].

~ Answered on 2012-01-13 07:51:59


Please follow @Sourav's advice.

If after restarting the server you get errors, you may need to set your directory options as well. This is done in the <Directory> tag in httpd.conf. Make sure the final config looks like this:

DocumentRoot "C:\alan"
<Directory "C:\alan">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all

~ Answered on 2012-01-13 08:03:24

Most Viewed Questions: