Apache正在尝试提供noindex.html但403的错误处理程序设置不同?

use*_*868 1 apache error-handling httpd.conf custom-error-handling

所以我刚刚在httpd.conf中为自定义错误页面设置了新的错误处理程序:

Alias "/error" "/var/www/error/"
    ErrorDocument 400 /error/error.php?code=400
    ErrorDocument 401 /error/error.php?code=401
    ErrorDocument 403 /error/error.php?code=403
Run Code Online (Sandbox Code Playgroud)

但是当我想要到达我的禁用子域(index.php)时,我得到了这个:

您无权访问此服务器上的/.

此外,尝试使用ErrorDocument处理请求时遇到404 Not Found错误.

但是,如果我尝试subdomain/jskldfjkd(和subdomain/forbiddendic /也),它会给出正确的错误页面.在Apache sais的错误日志中,它搜索noindex.html.我怎么解决这个问题?

use*_*868 6

在welcome.conf中有以下内容:

<LocationMatch "^/+$">
    Options -Indexes
    ErrorDocument 403 /error/noindex.html
</LocationMatch>
Run Code Online (Sandbox Code Playgroud)

我删除它,现在它工作:)