Modify and add Apache's default site Directory Apache install Apache 2.4 Apache Ant

Source: Internet
Author: User
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.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.