系统之家 - Windows操作系统&装机软件下载网站!

当前位置: 首页  >  教程资讯  >  电脑教程 Apache中设置默认首页的方法

Apache中设置默认首页的方法

时间:2023-06-02 16:16:41 来源: 人气:

   在你安装后的Apache目录下,有一个conf目录,在这个目录里,有一个"httpd.conf"文件.我们要做的,就是修改这个文件.,  在这个文件里,凡是以"#"开头的每一行,都是无效的,如果你想让你的设置起作用,就要把行首的"#"去掉.,  找到 DirectoryIndex 这段.把它改成DirectoryIndex index.php index.Html index.html 这样,你的网站目录的默认首页是 index.php, 如果没有index.php系统会自动寻找index.html、html做为默认首页了。,  注意事项:index.php index.Html之间要有一个空格,  另外你还可以操作一下其它的:,  找到 ServerRoot 这段.将它设成你的Apache安装目录,我的是 ServerRoot "D:/Apache Group/Apache2",  找到 DocumentRoot 这段.把他设成你网站的根目录,我的是 DocumentRoot "D:/Apache Group/web,

作者

教程资讯

电脑教程排行

系统教程

系统主题