当前第2页 返回上一页
第一步、将DocumentRoot的目录修改成项目的目录,譬如我的项目名称叫test,目录为: D:/Program Files/Apache Software Foundation/PHPWorkspace/test,那我的DocumentRoot就是:
1 | DocumentRoot "D:/Program Files/Apache Software Foundation/PHPWorkspace/test"
|
第二步、找到“This should be changed to whatever you set DocumentRoot to.”,将其下的<Directory设置成与DocumentRoot相同,我这里设置完成之后是这样子的:
1 2 3 4 5 6 7 8 | < Directory "D:/Program Files/Apache Software Foundation/PHPWorkspace/test">
Options -Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
#指定访问顺序
DirectoryIndex index.php index.html
</ Directory >
|
PS:注释代码去掉了。我这里的末尾添加了默认访问页面,也可以不加,默认回去找index.php、index.html等
注意:这两部当中涉及到的两个路径DocumentRooth和Director必须保持一致,否则会报没有权限的错误。
以上就是配置Apache服务器的默认首页的详细内容,更多文章请关注木庄网络博客!
返回前面的内容
相关阅读 >>
Apache将http重定向到https
Apache查看当前并发数多少
Apache禁用sslv3的方法
Apache怎么绑定域名
Apache组织为什么这么厉害
Apache哪个公司的
查看Apache加载了哪些模块的方法是什么
Apache如何开启gzip压缩功能
Apache虚拟主机是什么意思
Apache是什么软件
更多相关阅读请进入《Apache》频道 >>
转载请注明出处:木庄网络博客 » 配置Apache服务器的默认首页