Apache is the World's most used Web server Software. It can run on almost all widely used computer platforms and is one of the most popular web server-side software due to its widespread use across platforms and Security.
When you install Apache, the system is given a default file root Directory. If you think it is inconvenient to have this default directory, you should set up a different directory as the Apache file root directory, You can modify the configuration file of Apache httpd.conf about the file root directory.
The next combination of online information and I configure the site root directory experience, hereby recorded and as a share. (ps. The following is an example of an integrated environment such as wampserver, and the rest of the software is similar).
Next is a brief introduction to Wampserver:
Wampserver is an integrated software package for Apache web servers, php interpreters, and MySQL databases developed by the French. Frees up developers to spend their time in a cumbersome configuration environment, freeing up more energy for Development. Wampserver is the Windows Apache Mysql PHP integrated installation environment, that is, under window
apache, php, and MySQL server software.
After downloading the wampserver, it is the default Web site root directory is: "d:/wamp/www" (example If different click on the bottom right corner of the wampserver has a WWW directory is the default Web site root Directory)
For example, I'm now going to change the Web root directory to "e:/study"
1. Open the httd.conf file in the D:\wamp\bin\apache\apache2.4.23\conf (native sample),
(1) ctrl+f Search will change DocumentRoot "d:/wamp/www" to DocumentRoot "e:/study"
(2) ctrl+f Search will <directory "d:/wamp/www" > change to <directory "e:/study" >
2. Open the httpd-vhosts.conf under the D:\wamp\bin\apache\apache2.4.23\conf\extra file
(1) ctrl+f Search will change DocumentRoot d:/wamp/www to DocumentRoot e:/study/
(2) ctrl+f Search will <directory "d:/wamp/www" > change to <directory "e:/study/" >
To modify the site root directory to complete
Apache Configure Web site root directory