Tweaks to set up more hostnames
[sysconfig/apache2.git] / conf-available / nagios4-cgi.conf
1 # apache configuration for nagios 4.x
2
3 #ScriptAlias /cgi-bin/nagios4 /usr/lib/cgi-bin/nagios4
4 #ScriptAlias /nagios4/cgi-bin /usr/lib/cgi-bin/nagios4
5 Alias /cgi-bin/nagios4 /usr/lib/cgi-bin/nagios4
6 Alias /nagios4/cgi-bin /usr/lib/cgi-bin/nagios4
7
8 # Where the stylesheets (config files) reside
9 Alias /nagios4/stylesheets /etc/nagios4/stylesheets
10
11 # Where the HTML pages live
12 Alias /nagios4 /usr/share/nagios4/htdocs
13
14 <DirectoryMatch (/usr/share/nagios4/htdocs|/usr/lib/cgi-bin/nagios4|/etc/nagios4/stylesheets)>
15     Options FollowSymLinks
16     DirectoryIndex index.php index.html
17     AllowOverride AuthConfig
18     #
19     # The default Debian nagios4 install sets use_authentication=0 in
20     # /etc/nagios4/cgi.cfg, which turns off nagos's internal authentication.
21     # This is insecure.  As a compromise this default apache2 configuration
22     # only allows private IP addresses access.
23     #
24     # The <Files>...</Files> below shows how you can secure the nagios4
25     # web site so anybody can view it, but only authenticated users can issue
26     # commands (such as silence notifications).  To do that replace the
27     # "Require all granted" with "Require valid-user", and use htdigest
28     # program from the apache2-utils package to add users to
29     # /etc/nagios4/htdigest.users.
30     #
31     # A step up is to insist all users validate themselves by moving
32     # the stanza's in the <Files>..<Files> into the <DirectoryMatch>.
33     # Then by setting use_authentication=1 in /etc/nagios4/cgi.cfg you
34     # can configure which people get to see a particular service from
35     # within the nagios configuration.
36     # 
37
38     AuthDigestDomain "Nagios4"
39     AuthDigestProvider file
40     AuthUserFile        "/etc/apache2/htdigest"
41     AuthGroupFile       "/etc/apache2/htgroups"
42     AuthName    "dehnerts.com"
43     AuthType    Digest
44     Require group   nagios
45     #Require    valid-user
46 </DirectoryMatch>
47
48 <Directory /usr/share/nagios4/htdocs>
49     Options     +ExecCGI        
50 </Directory>
51
52 <Directory /usr/lib/cgi-bin/nagios4>
53     Options     +ExecCGI        
54 </Directory>