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

How to modify the designated home page of apache

步履不停
Release: 2019-07-27 09:14:02
Original
5074 people have browsed it

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!

Related labels:
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
Latest Issues
Apache automatically stops
From 1970-01-01 08:00:00
0
0
0
apache restart failed
From 1970-01-01 08:00:00
0
0
0
apache error
From 1970-01-01 08:00:00
0
0
0
How apache logs
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template