The file root directory of Apache HTTP Server (documentroot)
Source: Internet
Author: User
How to set the file root directory (documentroot) for Apache HTTP Server.
When Apache is installed, the system is given a default file root directory.
If you think it is inconvenient to have a Web page in this default directory, think that you should set up another directory as the Apache file root directory, you can modify the Apache configuration file httpd.conf about the file root directory settings.
The default file root directory (documentroot) for Apache HTTP Server is:
DocumentRoot "C:/Program Files/apache Software Foundation/apache2.2/htdocs"
The operations for modifying the Apache file root (documentroot) are as follows:
. Save configuration file http.conf. > All.
1. In order to avoid modification errors, please back up your Apache profile httpd.conf, the path to this configuration file is:
C:/Program Files/apache Software foundation/apache2.2/conf/httpd.conf
2. Open the http.conf file and find the line that starts with DocumentRoot, which will
DocumentRoot"C:/Program Files/apache Software Foundation/apache2.2/htdocs"
Change to a new documentroot path, such as your new path to C:/htdocs, and change it to
DocumentRoot "C:/htdocs"
3. Then find the following content in the http.conf file
# This should is changed to whatever your set DocumentRoot to.#
<directory "C:/Program files/apache Software Foundation/apache2.2/htdocs" >
Change the path in diectory to your new file root directory, for example:
<directory"C:/htdocs" >
4. Save the configuration file http.conf.
5. After the configuration file has been modified, the Apache Service should be restarted. (Start--> all Programs--> Apache HTTP Server 2.2--> Monitor Apache Servers--> restart)
After you have modified the file root directory, you can store your Web page in the new directory.
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.