
2、在这个文件里,凡是以"#"开头的每一行,都是无效的,如果你想让你的设置起作用,就要把行首的"#"去掉.
3、找到 DirectoryIndex 这段.把它改成DirectoryIndex index.php index.Html index.html 这样,你的网站目录的默认首页是 index.php, 如果没有index.php系统会自动寻找index.html、html做为默认首页了。
4、注意事项:index.php index.Html之间要有一个空格
5、另外还可以 *** 作一下其它的:
6、找到 ServerRoot 这段.将它设成你的Apache安装目录,我的是 ServerRoot "D:/Apache Group/Apache2"
7、找到 DocumentRoot 这段.把他设成你网站的根目录,我的是 DocumentRoot "D:/Apache Group/web 。
Apache的默认首页是在Apache->htdocs下的index.html也可以修改成别的文件,打开Apache->conf->httpd.conf,搜索DirectoryIndex,在DirectoryIndex后面添加index.php等,服务器搜索不到index.html就去搜索index.php
当然也可以修改网站的默认根目录,打开httpd.conf搜索DocumentRoot和Directory,修改它们的路径就可以了
望采纳,谢谢!
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)