# apache configuration for nagios 2.x
# note to users of nagios 1.x:
#	throughout this file are commented out sections which preserve
#	backwards compatibility with bookmarks/config for nagios 1.x.  simply
#	look for lines following "nagios 1.x:" comments.

ScriptAlias /cgi-bin/nagios2 /usr/lib/cgi-bin/nagios2
ScriptAlias /nagios2/cgi-bin /usr/lib/cgi-bin/nagios2
# nagios 1.x:
#ScriptAlias /cgi-bin/nagios /usr/lib/cgi-bin/nagios2
#ScriptAlias /nagios/cgi-bin /usr/lib/cgi-bin/nagios2

# Where the stylesheets (config files) reside
Alias /nagios2/stylesheets /etc/nagios2/stylesheets
# nagios 1.x:
#Alias /nagios/stylesheets /etc/nagios2/stylesheets

# Where the HTML pages live
Alias /nagios2 /usr/share/nagios2/htdocs
# nagios 1.x:
#Alias /nagios /usr/share/nagios2/htdocs

<DirectoryMatch (/usr/share/nagios2/htdocs|/usr/lib/cgi-bin/nagios2)>
	Options FollowSymLinks

	DirectoryIndex index.html

	AllowOverride AuthConfig
	Order Allow,Deny
	Allow From All

	AuthName "Nagios Access"
	AuthType Basic
	AuthUserFile /etc/nagios2/htpasswd.users
	# nagios 1.x:
	#AuthUserFile /etc/nagios/htpasswd.users
	require valid-user
</DirectoryMatch>

# Enable this ScriptAlias if you want to enable the grouplist patch.
# See http://apan.sourceforge.net/download.html for more info
# It allows you to see a clickable list of all hostgroups in the
# left pane of the Nagios web interface
# XXX This is not tested for nagios 2.x use at your own peril
#ScriptAlias /nagios2/side.html /usr/lib/cgi-bin/nagios2/grouplist.cgi
# nagios 1.x:
#ScriptAlias /nagios/side.html /usr/lib/cgi-bin/nagios2/grouplist.cgi

