Search code examples
apachexampp

Difference between ServerRoot, DocumentRoot, and Directory


While playing with Apache, I messed up the paths without making a backup httpd.config file.

The file is located at C:\xampp\apache\conf\httpd.config

I want to keep my web project on the D: drive as a virtual folder. This is the current non-working state. How can I fix this or revert to the xampp defaults?

ServerRoot "C:\xampp\apache"
DocumentRoot "D:\workspace"
<Directory "D:\workspace\AutionWebSite">

Solution

    • ServerRoot = path to the webserver executable/dir
    • DocumentRoot = path to your files that are delivered by the server
    • The <Directory> directive is used to configure settings for a specific directory. However, the <Directory> command in your question is not complete.