从基本authentication中排除为根目录设置的nagios目录

我有Apache的根目录的基本身份validation。 我是这样设置的。

/etc/httpd/conf.d/xxxx.conf

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

由于此设置是以root身份进行设置的,因此会覆盖Nagios渲染Nagios无法运行的基本身份validation。 我试图通过做排除Nagios目录

  <Location /nagios> Allow from all Satisfy any </Location> 

但是,由于需要对Nagios设置进行主持,所以一起禁用了身份validation。

排除Nagios子目录的正确方法是什么?

尝试使用“Directory”指令而不是“Location”指令。 地点往往有更广泛的范围,使细粒度控制更加困难。