Apache Configure Web site root directory

Source: Internet
Author: User

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

Related Article

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.