Wednesday, December 5, 2012

require directives present and no Authoritative handler

If you get an error that looks like this in the Apache error.log:
access to / failed, reason: require directives present and no Authoritative handler.

Then you've probably configured your .htaccess file wrong. As an example, you may have configure the Require user wrong.

If you want to grant access to a singel user then the line in the htaccess-file should look like this:
Require user <username>
And if you want to grant access to any valid user then it should be like this:
Require valid-user

An example of the whole htaccess with Basic authentication:
AuthUserFile /var/www/.htpasswd
AuthName "Enter Password"
AuthType Basic
Require user admin

Hope it helps you out!