0
votes

how to change the root folder in xampp.. it's my first time using xampp, and i'm trying to change the root folder of my website from this (htdocs/blog) to this folder (htdocs/blog/public) i saw heard that we can change the root folder by editing directoryRoot in the http.conf file but there's no directoryRoot inside my http.conf file that's all what i have inside the .conf file

Alias /bitnami/ "/opt/lampp/apache2/htdocs/"

Alias /bitnami "/opt/lampp/apache2/htdocs"

Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all

1

1 Answers

2
votes

You need to find the Document Root directive in the httpd.conf to change the root folder. For example:

# DocumentRoot "/xampp/htdocs"
DocumentRoot "/path/to/your/web/project"

Then find Directory and make the change there:

# <Directory "/xampp/htdocs">
<Directory /path/to/your/web/project">

Take my advice, always comment out the line you do not want so you can return to it later if need be or something gets screwed up.