Working with Dynamic Configuration Files
178
Netscape Enterprise Server Administrator’s Guide
•
RequireAuth dbm=
dbmfile
userfile=
database_name
realm=
string
userpat=
PATTERN
RequireAuth
lets you ask the user for a username and a password when
accessing the directory.
dbm
is a user database. Note that
dbm
can only be
used on a 2.x Enterprise user database.
userfile
is an NCSA-style user
database filename. The file consists of lines in the format
user:encrypted_password
. realm
is a unique string to tell your
users which password they should use.
userpat
determines which users
from the given
dbm
or
userfile
are allowed access.
userpat
is a
wildcard pattern or list of user names. For example, you can use the syntax
userpat="user1"
or
userpat="(user1|user2)"
for specifying a
user or a list of users.
•
RestrictAccess method=HTTP-method type=allow|deny
ip=addrpattern dns=hostpattern return-code=403|404
R
estrictAccess
applies access control to the directory and restricts
certain users.
method
is an optional parameter specifying a wildcard
pattern of HTTP methods to protect (no method specified means all of
them).
type
determines whether the IP address wildcard pattern or
hostname wildcard pattern is allowed or denied access. If the only
RestrictAccess
directives in a
Files
set are of type
allow
, then all
hosts not specified by the patterns are denied.
ip
must be typed in
lowercase for the directive to work. More than one
RestrictAccess
can
appear in the file. The order in which these lines appear is important; later
RestrictAccess
lines override earlier ones.
Example of an .nsconfig File
The following example shows an
.nsconfig
file:
<Files *
ErrorFile reason="Unauthorized" code="401" path="/errors/unauthorized.html"
ErrorFile reason="Forbidden" code="403" path="/errors/forbidden.html"
ErrorFile reason="Not Found" code="404" path="/errors/notfound.html"
ErrorFile reason="Server Error" code="500" path="/errors/server-error.html"
RestrictAccess method="(GET|HEAD|POST)" type="allow" ip="*"
RestrictAccess method="(GET|HEAD|POST)" type="deny" ip="198.95.251.30" return-code="404"
</Files
<Files *.gif
AddType exp=*.gif type=application/octet-stream
</Files
<Files *.txt
RequireAuth dbm="
server_root/authdb/default" realm=Text userpat="user*"
</Files
Summary of Contents for Netscape Enterprise Server
Page 30: ...Contacting Technical Support 30 Netscape Enterprise Server Administrator s Guide ...
Page 32: ...32 Netscape Enterprise Server Administrator s Guide ...
Page 56: ...Sending Error Information to Netscape 56 Netscape Enterprise Server Administrator s Guide ...
Page 66: ...66 Netscape Enterprise Server Administrator s Guide ...
Page 112: ...Managing a Preferred Language List 112 Netscape Enterprise Server Administrator s Guide ...
Page 158: ...158 Netscape Enterprise Server Administrator s Guide ...
Page 182: ...Using the Watchdog uxwdog Process Unix 182 Netscape Enterprise Server Administrator s Guide ...
Page 196: ...Viewing Events Windows NT 196 Netscape Enterprise Server Administrator s Guide ...
Page 218: ...Enabling the Subagent 218 Netscape Enterprise Server Administrator s Guide ...
Page 266: ...266 Netscape Enterprise Server Administrator s Guide ...
Page 302: ...Enabling WAI Services 302 Netscape Enterprise Server Administrator s Guide ...
Page 310: ...310 Netscape Enterprise Server Administrator s Guide ...
Page 446: ...Customizing the Search Interface 446 Netscape Enterprise Server Administrator s Guide ...
Page 448: ...448 Netscape Enterprise Server Administrator s Guide ...
Page 454: ...Responses 454 Netscape Enterprise Server Administrator s Guide ...
Page 464: ...Referencing ACL Files in obj conf 464 Netscape Enterprise Server Administrator s Guide ...
Page 504: ...504 Netscape Enterprise Server Administrator s Guide ...