Make XAMPP/Apache serve file outside of htdocs

If you use XAMPP for development, you have to use the htdocs folder to store your production/development files. If you want to map any other folder to use as a development path, you can just do the following settings.

Edit the value of  DocumentRoot setting in XAMPP\apache\conf\httpd.conf.

It should currently be:


Change it to the folder you wish


Points to note.

  • Don’t forget to edit it in BOTH lines that ask for DocumentRoot. If you only change the top one, you’ll get read-access errors.
  •  You have to use forward slashes “/” instead of back slashes “\”.
  • Don’t include the trailing “/” at the end.




Published by

Mohit Kumar

A simple person who likes to share his thoughts on this blog. Know more about me

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.