Set Apache Root Directory

How to Set the Apache Web Site Root Directory

The DocumentRoot directive is used to specify the web server’s root directory, so if you make a request to http://localhost/
Apache will map that address with the directory specified in DocumentRoot.

Open up httpd.conf (in your Apache/conf directory), find DocumentRoot and set it to be your the directory where you want your web site root. If you are migrating from IIS you can put something like this: DocumentRoot “c:/inetpub/wwwroot”

While you are doing this another directive you should set is called the ServerName directive. Set this to be the DNS name of your server (eg ) if you do not have a DNS name you can also use an IP address. Note that the newer versions of Apache preset this value with the installer.