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
Содержание Netscape Enterprise Server
Страница 30: ...Contacting Technical Support 30 Netscape Enterprise Server Administrator s Guide ...
Страница 31: ...Part 1 Server Basics 31 1 Server Basics Introduction to Enterprise Server Administering Enterprise Servers ...
Страница 32: ...32 Netscape Enterprise Server Administrator s Guide ...
Страница 56: ...Sending Error Information to Netscape 56 Netscape Enterprise Server Administrator s Guide ...
Страница 64: ...Migrating a Server From a Previous Version 64 Netscape Enterprise Server Administrator s Guide ...
Страница 66: ...66 Netscape Enterprise Server Administrator s Guide ...
Страница 112: ...Managing a Preferred Language List 112 Netscape Enterprise Server Administrator s Guide ...
Страница 158: ...158 Netscape Enterprise Server Administrator s Guide ...
Страница 182: ...Using the Watchdog uxwdog Process Unix 182 Netscape Enterprise Server Administrator s Guide ...
Страница 196: ...Viewing Events Windows NT 196 Netscape Enterprise Server Administrator s Guide ...
Страница 218: ...Enabling the Subagent 218 Netscape Enterprise Server Administrator s Guide ...
Страница 266: ...266 Netscape Enterprise Server Administrator s Guide ...
Страница 302: ...Enabling WAI Services 302 Netscape Enterprise Server Administrator s Guide ...
Страница 310: ...310 Netscape Enterprise Server Administrator s Guide ...
Страница 390: ...Customizing the Web Publisher User Interface 390 Netscape Enterprise Server Administrator s Guide ...
Страница 446: ...Customizing the Search Interface 446 Netscape Enterprise Server Administrator s Guide ...
Страница 448: ...448 Netscape Enterprise Server Administrator s Guide ...
Страница 454: ...Responses 454 Netscape Enterprise Server Administrator s Guide ...
Страница 464: ...Referencing ACL Files in obj conf 464 Netscape Enterprise Server Administrator s Guide ...
Страница 504: ...504 Netscape Enterprise Server Administrator s Guide ...