Hitachi

uCosminexus Application Server HTTP Server User Guide


4.5.3 Access control for directory

If you create an access control file (.htaccess) under a specific directory, you can set access permissions for that directory. Specify a client name (IP address) and a user name for which access is permitted or denied in the access control file.

Organization of this subsection

(1) Access control file

If you create the access control file under a specific directory, you can set the access permissions for that directory. Specify the name of access control file in the AccessFileName directive. The default name is .htaccess.

The access control from the access control file is enabled without restarting the Web server. However, for correct operations you need to set the AllowOverride directive of httpsd.conf to an appropriate level that allows overwriting.

If you specify a password file in the access control file, the server will request user to enter the user name and password when the user accesses the directory.

Important note

The access control file (.htaccess) and password file (.htpasswd) need not have a one-to-one relationship. You can specify the same password file in the AuthUserFile directive for different access control files.

(2) Example to set the access permission

In a directory configuration such as the one given below, set the access permissions to access control files for each directory:

[Figure]