Question

So i have just set new Error Handlers in httpd.conf for custom error pages:

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

But when i am trying to reach my forbidden subdomain (index.php) i get this:

You don't have permission to access / on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

But if i try the subdomain/jskldfjkd (and subdomain/forbiddendic/ also) it gives the correct error page. In the error logs Apache sais it searches for noindex.html. How can i solve this?

Was it helpful?

Solution

In welcome.conf was standing the following:

<LocationMatch "^/+$">
    Options -Indexes
    ErrorDocument 403 /error/noindex.html
</LocationMatch>

I removed it, and now it works :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top