Home  >  Article  >  Operation and Maintenance  >  What is the root directory of apache

What is the root directory of apache

(*-*)浩
(*-*)浩Original
2019-10-29 13:45:0410593browse

What is the root directory of apache

The Apache website root directory in the XAMPP collection software is by default under the XAMPP subfolder htdocs, when you build a lot of websites, some are large , it is a bit inconvenient to quickly open this directory on your computer. Below, I will briefly explain how to modify the website root directory: (Recommended learning: apache use)

First, open the httpd.conf file. This file is in the "apache\conf" folder under the XAMPP installation directory. (My own httpd.conf file directory is: D:\xampp\apache\conf)

Second, modify the code. In the httpd.conf file, find the following two lines of code and modify them. (The original root directory of my website is: D:\xampp\htdocs)

DocumentRoot "D:/xampp/htdocs"
<Directory "D:/xampp/htdocs">

Just change the two directories to the directories you want. For example, I modified it as follows: (D:/WEB is my current directory New URL root directory)

DocumentRoot "E:/WEB"
<Directory "E:/WEB">

Third, restart Apache. Copy the website files to the new website directory, restart Apache, OK

The above is the detailed content of What is the root directory of apache. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn