Changing the root folder that apcahe points to
Document Root: DocumentRoot is the directory out of which you will serve your documents. i.e this is the folder from where the files and folders will be listed when you type http://localhost or http://domain-name in your browser. By default, all requests are taken from this directory.
For example if you have installed apache under "C:\Program Files\Apache\Apache2.2" (Windows) folder or say "/etc/httpd/" (Linux) folder. Files will be serverd from "C:\Program Files\Apache Group\Apache2.2\htdocs" (Windows) or "/etc/httpd/htdocs/" (Linux) folder.
You can change this default document root value to point a different folder by editing the httpd.conf file present under the /conf
E.g: Where httpd.conf will be present?
After editing the file search for "DocumentRoot" and change the line to point to new folder
E.g: For Windows
E.g: For Linux
Note: Please make a note that there is no ending slash. If you want to point to temp folder user E:/temp and not E:/temp/
After the above change is search for the line that starts as <Directory and contains the default documentroot value.
Replace the default value with the same value you have changed for DocumentRoot