# Apache Configuration for Netdisco
# This is applied to each virtual server

Alias /netdisco                      "/usr/pkg/netdisco/html/"
Alias /netdisco/                     "/usr/pkg/netdisco/html/"

<Location /netdisco>
	Options +Indexes
</Location>

# Turn on MASON for .html documents
PerlSetVar site "netdisco"
<LocationMatch "/netdisco/.*\.html$">
	SetHandler perl-script
	PerlHandler netdisco::Mason
</LocationMatch>

# Decline access to mason internals
<LocationMatch "/netdisco/.*(\.mc|autohandler|dhandler)$">
	SetHandler perl-script
    PerlInitHandler Apache::Constants::NOT_FOUND
</LocationMatch>

# Authenticate
# Uncomment these lines and set apache_auth: true in netdisco.conf
# to allow Apache to perform Digest authentication.
#<Location "/netdisco/apache_login.html">
#	AuthType Digest
#	AuthName "netdisco"
#	AuthUserFile /usr/pkg/netdisco/auth.htdigest
#	Require valid-user
#</Location>

# Uncomment next three lines to 
#  make every request in the switch/ dir go through Mason
#<Location /netdisco/switch/>
#	SetHandler perl-script
#	PerlHandler netdisco::Mason
#</Location>
