我已安装 zpanel
与 centos 6.3
.
现在有什么问题。
我已添加域 mydomain.com
我添加了空白 index.php
文件。
我也加了.htaccess
带有“拒绝所有人”的文件
现在,当我在浏览器中打开页面时,我得到的是 Apache 2 测试页面 403 Forbidden
但是如果我打开 http://mydomain.com/index.php
,现在我得到 403 Forbidden。
我试图编辑 apache 配置文件 Directoryindex
但没有积极的结果。任何人都可以帮助我吗?
最佳答案
尝试禁用默认的 Apache CentOS 欢迎页面:
#
# This configuration file enables the default "Welcome"
# page if there is no default index page present for
# the root URL. To disable the Welcome page, comment
# out all the lines below.
#
<LocationMatch "^/+$">
Options -Indexes
ErrorDocument 403 /error/noindex.html
</LocationMatch>
编辑文件
/etc/httpd/conf.d/welcome.conf
并评论一切。只需删除 welcome.conf
文件(或将其重命名为 .conf.disabled
例如)也应该可以解决问题。然后,重新加载 apache 配置(
service httpd restart
),事情应该按预期工作。
关于apache - htaccess 拒绝所有获取 apache 服务器测试页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14001228/