First, modify the Apache default Site Directory
After the Apache HTTP server is installed, the default site directory is located in the Htdocs folder under its installation directory, and the default home page is the index.html file for that folder. For example, my Apache is installed inside c:/wamp/bin/apache/apache2.2.21, then my Apache's full default Site directory address is C:/wamp/bin/apache/apache2.2.21/htdocs /, the default home page is c:/wamp/bin/apache/apache2.2.21/htdocs/index.html.
Many times, whether it is learning, testing, or want to really build their own site, we may not want to put their own site in the Apache default site Directory, this section of knowledge will help you solve the problem.
Modification Method:
1, to the Apache installation directory to find the Conf folder, the folder will be httpd.conf such a text document, it is the Apache configuration file, is responsible for command Apache operation.
2, double hit open httpd.conf This text document, press the CTRL+F key on the keyboard to find "DocumentRoot" "(with double quotation marks", see figure), after finding out (only one place), the string "DocumentRoot" The strings in the back double quotes are modified to the site directory that you want to set.
Such as: The default is DocumentRoot "C:/wamp/bin/apache/apache2.2.21/htdocs", now modified to DocumentRoot "D:/apache"
3, after completing the 2nd step above, do not close the httpd.conf file, continue to find, find " < p="">
For example: By default , it is now modified to
4, at the same time press the Ctrl+s key on the keyboard to save the above changes, you must remember to stop (stop) an Apache service and then start (start), so that the changes take effect.
The above describes the modification and addition of Apache's default site directory, including the Apache content, I hope to be interested in PHP tutorial friends helpful.