Home >Operation and Maintenance >Apache >How to modify the designated home page of apache

How to modify the designated home page of apache

步履不停
步履不停Original
2019-06-29 13:09:305043browse

How to modify the designated home page of apache

In the Apache directory after you installed it, there is a conf directory. In this directory, there is a "httpd.conf" file. What we have to do is to modify this file.

In this file, every line starting with "#" is invalid. If you want your settings to work, you must remove the "#" at the beginning of the line.

Find the DirectoryIndex section. Change it to DirectoryIndex index.php index.Html index.html In this way, the default homepage of your website directory is index.php. If there is no index.php, the system will automatically look for index.html, html As the default homepage.

Note: There must be a space between index.php index.Html

In addition, you can also do other things:

Find the ServerRoot section. Set it into your Apache installation directory, mine is ServerRoot "D:/Apache Group/Apache2"

Find the DocumentRoot section. Set it to the root directory of your website, mine is DocumentRoot "D:/Apache" Group/web

For more technical articles related to Apache, please visit the Apache Tutorial column to learn!

The above is the detailed content of How to modify the designated home page 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