How to modify and add Apache's default site Directory _php tutorial

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.

http://www.bkjia.com/PHPjc/327994.html www.bkjia.com true http://www.bkjia.com/PHPjc/327994.html techarticle first, modify the Apache default Site Directory Apache HTTP Server installed, the default site directory is located in its installation directory in the Htdocs folder, the default home page is the folder index.ht ...

  • 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.