What is the root directory of apache

(*-*)浩
Release: 2019-10-29 13:45:04
Original
10574 people have browsed it

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">
Copy after login

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">
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!