Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have basic auth from the root directory for Apache. I am setting it like so.


 <Location />
    AuthType Basic
    AuthUserFile xxxxxxxx
    AuthName "Restricted Area"
    Require valid-user

Since this setting is set at root, it overrides the Basic Auth for Nagios rendering Nagios inoperable. I tried to exclude the Nagios directory by doing

  <Location /nagios>
    Allow from all
    Satisfy any

But that disabled authentication all together since it takes presidence against the Nagios settings.

What is the correct way of excluding just the Nagios sub-directory?

share|improve this question
up vote 5 down vote accepted

Try using the "Directory" directive instead of the "Location" directive. Locations tend to have a wider scope which makes fine-grained control more difficult.

share|improve this answer
And make sure you have the correct AllowOverride AuthConfig in place to allow the subdirectory permissions to have effect. – Shaun Dewberry Feb 22 '11 at 13:43
That did it! Thanks, taking note on the Location scope vs Directory. – Saifis Feb 22 '11 at 15:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.