XAMPP – Changing the DocumentRoot Folder doesn’t work

xampp

I got a strange problem, which I haven't encountered yet. When I change the DocumentRoot AND RESTART the server the change is not applied. It worked before, but suddenly it's not.

 DocumentRoot "F:/xampp/htdocs/www/pct/"

I'am also sure to edit the right file:

 F:\xampp\apache\conf\httpd.conf

Best Answer

Are you sure that you are editing the DocumentRoot for the Virtual Host that you are using? Ensure that the DocumentRoot directive is under the Virtual Host you are currently using.

It should be something like:

<virtualhost *:80>
 DocumentRoot *****
 .....other stuffs....
</virtualhost>