Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 743
enrekan2011 Avatar asked Jan 13 '12 07:01

enrekan2011


People also ask

Where is the location of xampp folder?

Where are the main XAMPP configuration files? The main XAMPP configuration files are located as follows: Apache configuration file: \xampp\apache\conf\httpd. conf, \xampp\apache\conf\extra\httpd-xampp.


2 Answers

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].

like image 100
Sourav Avatar answered Sep 26 '22 06:09

Sourav


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 </Directory> 
like image 25
mingos Avatar answered Sep 24 '22 06:09

mingos