# SAMPLE CONFIG SNIPPETS FOR APACHE WEB SERVER
#
# This file contains examples of entries that need
# to be incorporated into your Apache web server
# configuration file.  Customize the paths, etc. as
# needed to fit your system.

<IfModule !mpm_prefork_module>
        LoadModule cgid_module /usr/local/lib/apache2/mod_cgid.so
</IfModule>
<IfModule mpm_prefork_module>
        LoadModule cgi_module /usr/local/lib/apache2/mod_cgi.so
</IfModule>

ScriptAlias /cgi-bin/nagios "/usr/local/sbin"

<Directory "/usr/local/sbin">
#  SSLRequireSSL
   Options ExecCGI
   AllowOverride None
   <IfVersion >= 2.3>
      <RequireAll>
         Require host 127.0.0.1

         AuthName "Nagios Access"
         AuthType Basic
         AuthUserFile /etc/nagios/htpasswd.users
         Require valid-user
      </RequireAll>
   </IfVersion>
   <IfVersion < 2.3>
      Order deny,allow
      Deny from all
      Allow from 127.0.0.1

      AuthName "Nagios Access"
      AuthType Basic
      AuthUserFile /etc/nagios/htpasswd.users
      Require valid-user
   </IfVersion>
</Directory>

Alias /nagios "/var/www/nagios"

<Directory "/var/www/nagios">
#  SSLRequireSSL
   Options None
   AllowOverride None
   <IfVersion >= 2.3>
      <RequireAll>
         Require host 127.0.0.1

         AuthName "Nagios Access"
         AuthType Basic
         AuthUserFile /etc/nagios/htpasswd.users
         Require valid-user
      </RequireAll>
   </IfVersion>
   <IfVersion < 2.3>
      Order deny,allow
      Deny from all
      Allow from 127.0.0.1

      AuthName "Nagios Access"
      AuthType Basic
      AuthUserFile /etc/nagios/htpasswd.users
      Require valid-user
   </IfVersion>
</Directory>
