Library Table of Contents Index Previous Page (Alt-p) Next Page (Alt-n) Comments

Editing the /etc/httpd.access file

About the /etc/httpd.access file  Top

The /etc/httpd.access file contains options that govern access to and appearance of each directory. The filer supports the following options:

Format for option information  Top

Option information for each directory in the /etc/httpd.access file is given in the following format:

<Directory directory>
option ...
</Directory>

directory is the specific directory tree name for which you want to enable authorized access.

Editing the /etc/httpd.access file  Top

To edit the /etc/httpd.access file, complete the following steps.

Step

Action

1

Open the /etc/httpd.access file for editing.

2

Specify the directory tree you want to protect in the following line:

<Directory directory>

directory is the specific directory tree name you want protected.

If...

Then...

You are configuring basic authentication using /etc/httpd.passwd and /etc/httpd.group files

Specify the alias for the directory in the following line:

AuthName title_phrase

title_phrase is any string you specify that appears instead of the directory name in the browser password dialog box when a user tries to access the directory; this name can contain spaces.

Example

AuthName Secured Area

You are configuring NTLM authentication

Specify the following, exactly as shown:

AuthName Windows(tm) Authentication

Go to Step 5.

3

Specify the users who can access the directory in the following line:

require user user_id [, user_id, ...]

user_id is the specific user ID for each user who should have access to the directory.

4

Specify the groups that can access the directory in the following line:

require group group_id [, group_id, ...]

group_id is the specific group ID for each group that should have access to the directory.

5

End the option or list of options for the specified directory using the following line:

</Directory>
6

Save the file.

Example  Top

The following example shows the use of multiple Directory options in a /etc/httpd.access file to use either Basic or NTLM authentication on a filer.

<Directory /vol/vol0/web1>
AuthName Windows(tm) Authentication
</Directory>
<Directory /vol/vol0/web2>
AuthName Web2 directory
require user test1
require group testg1
</Directory>
<Directory /vol/vol0/web3>
AuthName Windows(tm) Authentication
</Directory>
<Directory /vol/vol0/web4>
AuthName Web4 directory
require user test2
</Directory>

In this example, web1 and web3 use NTLM authentication and web2 and web4 use basic authentication. Access to web2 is limited to user test1 and members of group testg1, and access to web4 is limited to user test2.

Library Table of Contents Index Previous Page (Alt-p) Next Page (Alt-n) Comments