~<<.htaccess>>
The AccessFileName directive defines the name of the file (access control file) that defines the access control directive. If AllowOverride directive permits the access, this file is referred to every time when the contents are requested and the access control is checked.
httpsd.conf, <VirtualHost>
AccessFileName .htaccess
The file name of the access control file is .htaccess.
This directive specifies the executable script with the CGI script name when the Web browser requests the contents specified in the MIME type or the handler. Specify the CGI script name in the URL. When performing multiple specifications of this directive, you cannot specify different CGI scripts with the same MIME type.
httpsd.conf, <VirtualHost>, <Directory>, .htaccess
FileInfo level
Action image/gif /cgi-bin/images.cgi
When the directory index is displayed, specify the AddAlt directive for displaying the character string related to a file specified by the extension. You can specify multiple extensions for one character string. You can specify this directive for displaying file attributes in environments such as the text mode Web browser where you cannot display icons.
You can specify the following in the extension:
When performing multiple specifications of this directive, you cannot specify different character strings with the same extension.
httpsd.conf, <VirtualHost>, <Directory>, .htaccess
Indexes level
AddAlt "HTML" htm html
When the file extension is htm or html, the character string "HTML" is displayed.
When the directory index is displayed, specify the AddAltByEncoding directive for displaying the character strings related to the MIME encoding (such as x-compress) in an environment where you cannot display icons. You can specify multiple MIME encoding for one character string. When performing multiple specifications of this directive, you cannot specify different character strings with the same MIME type.
httpsd.conf, <VirtualHost>, <Directory>, .htaccess
Indexes level
AddAltByEncoding "gzip" x-gzip
When the directory index is displayed, specify the AddAltByType directive for displaying the character string related to the MIME type (such as text/html) in an environment where you cannot display icons. You can specify multiple MIME types for one character string. When performing multiple specifications of this directive, you cannot specify different character strings with the same MIME type.
httpsd.conf, <VirtualHost>, <Directory>, .htaccess
Indexes level
AddAltByType "plain text" text/plain
The AddCharset directive specifies the character sets for file extension. The character set is set as the value of charset= in the Content-Type header. Use this directive for clearly specifying the character sets for the client. When performing multiple specifications of this directive, you cannot specify different character strings with the same extension. Specify the file extensions specified in the AddType directive or the TypesConfig directive, and file extension must be related to MIME types
httpsd.conf, <VirtualHost>, <directory>, .htaccess
FileInfo level
AddCharset EUC-JP .euc
AddCharset ISO-2022-JP .jis
AddCharset SHIFT_JIS .sjis
The AddDefaultCharset directive specifies the default value of the character set for a file extension. The specified default value becomes the default value for the settings of the AddCharset directive. The Content-Type is set as a default for text/plain and text/html.
On: ISO-8859-1 is set as the default character set.
Off: The character set is not set.
character-set: The specified character set is used as the default character set.
httpsd.conf, <VirtualHost>, <directory>, .htaccess
FileInfo level
AddDefaultCharset ISO-2022-JP
Specify the AddDescription directive when you want a character string to be displayed as a description for the file extension specified in the file name, the wild card notation file name, or the complete file name without path information when the directory index format is displayed. Note that, when a character string ending with a slash is specified in the file name, the character string is interpreted as a wild card specification with an * added.
You can specify the following in the file name:
When performing multiple specifications of this directive, you cannot specify different character strings for the same file name.
httpsd.conf, <VirtualHost>, <Directory>, .htaccess
Indexes level
AddDescription "The planet Mars" /web/pics/mars.gif
The AddEncoding directive specifies the relationship between the compression format and the extension required when the compressed data in the Web server is displayed on the Web browser. This directive is set when the Web server sends the Content-Encoding header to the Web browser as information of the compressed file deployment. The operation in which this header is used depends upon the implementation of the Web browser. When performing multiple specifications of this directive, you cannot specify different compression formats for the same extension.
httpsd.conf, <VirtualHost>, <Directory>, .htaccess
FileInfo level
AddEncoding x-compress Z Compression format of the file with extension Z is x-compress
AddEncoding x-gzip gz Compression format of the file with extension gz is x-gzip
Define the AddHandler directive to support the file extension processed by the handler.
Handler names that you can specify are as follows. When performing multiple specifications of this directive, you cannot specify different handler names for the same extension.
cgi-script: Execution of CGI script
imap-file: Image map processing
server-status: Status display
hws_cache: Cache of static contents
httpsd.conf, <VirtualHost>, <Directory>, .htaccess
FileInfo level
AddHandler cgi-script .cgi Extension.cgi is cgi-script handler
AddHandler imap-file map Extension map is imap-file handler
Specify the AddIcon directive to support and display the icons of the directory index for the extension. In the character string specify the characters to be displayed when the web browser cannot display the images. Specify the URL of the icon image file in the URL. When specifying the image file on the local host, you can omit 'http: //IP address' of the URL. Note that if you specify IPv6 addresses without omitting http://IP-address of the URLs, enclose each IPv6 address in square brackets ([ ]).
You can specify the following as an extension:
If you code ^^DIRECTORY^^ as the extension, you can set the icons for directories. If ^^BLANKICON^^ is specified as the extension, you can set the icons to match the header indent of the displayed contents when the directory index is displayed.
When performing multiple specifications of this directive, you cannot specify different character strings and URLs for the same extension.
httpsd.conf, <VirtualHost>, <Directory>, .htaccess
Indexes level
AddIcon /icons/tar.gif .tar
Icon definitions when the extension is .tar
AddIcon /icons/layout.gif .html .shtml .htm .pdf
Icon definitions when the extension is .html, .shtml, .htm, and .pdf
AddIcon /icons/text.gif .txt
Icon definitions when the extension is .txt
AddIcon /icons/back.gif ..
Icon definitions of the parent directory
AddIcon /icons/hand.right.gif README
Icon definitions of the README file
AddIcon /icons/folder.gif ^^DIRECTORY^^
Icon definitions for a directory
AddIcon /icons/blank.gif ^^BLANKICON^^
Indent icon definition of the directory index header
AddIcon http://[2001::123:4567:89ab:cdef]/icons/text.gif .txt
Icon definitions when an IPv6 address is specified
Specify the AddIconByEncoding directive in the case of displaying the icon with the support of MIME encoding when the directory index format is displayed. In the character string specify the characters to be displayed when the Web browser cannot display the images. Specify the URL of the icon image file in the URL. When specifying the image file on the local host, you can omit 'http://IP address' in the URL. Note that if you specify IPv6 addresses without omitting http://IP-address of the URLs, enclose each IPv6 address in square brackets ([ ]).
When performing multiple specifications of this directive, you cannot specify different character strings and URLs for the same MIME type.
httpsd.conf, <VirtualHost>, <Directory>, .htaccess
Indexes level
AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
Icon definitions for MIME encoding x-compress and x-gzip
Specify the AddIconByType directive in the case of displaying the icon with the support of MIME encoding when the directory index format is displayed. In the character string you can specify the characters to be displayed when the Web browser cannot display the images. You can specify the location of the image file name of the icon to be displayed in the URL. Note that if you specify IPv6 addresses without omitting http://IP-address of the URLs, enclose each IPv6 address in square brackets ([ ]).
When performing multiple specifications of this directive, you cannot specify different file names for the same MIME type.
httpsd.conf, <VirtualHost>, <Directory>, .htaccess
Indexes level
AddIconByType (TXT,/icons/text.gif) text/*
Icon definition for the MIME type text/*
AddIconByType (IMG,/icons/image2.gif) image/*
Icon definition for the MIME type image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
Icon definition for the MIME type audio/*
AddIconByType (VID,/icons/movie.gif) video/*
Icon definition for the MIME type video/*
The AddLanguage directive specifies the language to be used in the document. The language code is set in the Content-Language response header. If you specify this directive, you can perform the content negotiation to select contents that the Web server sends, when the language setting of Web browser sets the priority order (Accept-Language header) of the language code in the request. The language code depends upon the header information sent by the Web browser. Specify a language code based on the language codes defined in ISO639. Note that you must specify the MultiViews options with the Options directive to enable the content negotiation. When performing multiple specifications of this directive, you cannot specify different language codes for the same extension.
httpsd.conf, <VirtualHost>, <Directory>, .htaccess
FileInfo level
AddLanguage ja .ja Japanese
AddLanguage en .en English
AddLanguage fr .fr French
AddLanguage de .de German
AddLanguage da .da Danish
AddLanguage el .el Greek
AddLanguage it .it Italian
Specify the AddType directive when you want to associate the extension of the undefined contents and the MIME type in the file specified with the TypesConfig directive. When performing multiple specifications of this directive, you cannot specify different MIME types for the same extension.
httpsd.conf, <VirtualHost>, <Directory>, .htaccess
FileInfo level
AddType text/html .shtml
Associate the MIME type text/html with the extension .shtml.
Specify the Alias directive when replacing a specific URL requested from the Web browser with an optional name. However, in the URL you cannot specify the characters from ? (query string) onwards. The directory specified in the URL is replaced with the directory specified in the directory name and displayed on the Web browser.
You cannot specify a URL that is duplicated with the following directive specification values:
For example, the following URLs cannot be specified:
Alias /aaa/bbb/ C:/alias/
ProxyPass /aaa/ http://aaa.example.com/
Specify the directory name with an absolute path.
httpsd.conf,<VirtualHost>
Alias /icons/ "<Cosminexus-installation-directory>/httpsd/icons/"
Replace /icons/ with <Cosminexus-installation-directory>/httpsd/icons/.
Specify the AliasMatch directive when replacing the URL requested from the Web browser with an optional name. However, in the URL you cannot specify characters from ? (query string) onwards.
When a URL that satisfies the conditions described in the regular expressions is requested from the Web browser, the contents of the specified new path are displayed in the Web browser. When the contents are grouped using bracket () in the regular expressions, you can refer the character strings that match with the expression of group i by using $i in new path. Specify the numeric values from 1 to 9 for i.
You cannot specify a regular expression that is duplicated with the following direcrive specification values:
For example, the following regular expressions cannot be specified:
AliasMatch ^/aaa/bbb/(.*) C:/alias/$1
ProxyPass /aaa/ http://aaa.example.com/
Specify the new path with absolute path. When '$' or '&' are included as characters of the new path, add '' before these characters. Note that, you need not add '
' before '$'when you specify $i.
httpsd.conf,<VirtualHost>
AliasMatch ^/html/(.*) "C:/htdocs/html/$1"
If a request starts with /html/, replace the /html/ portion with C:/htdocs/html/. For example, if you want to access /html/index.html, replace /html/index.html with C:/htdocs/html/index.html.
Specify the 'Allow from' directive to restrict the clients that can access the Web server. In the host, you can specify the domain name, IP address, subnet, and net mask of the host to which access is permitted. Specify all for permitting access from all the hosts.
The domain name, address, and prefix length of the IPv6 address can also be specified for a host. Do not specify the IPv6 address by enclosing it in square brackets ([ ]). The prefix length is specified in the IPv6-address/prefix-length format. Specify the prefix length as a decimal value.
If you specify env=environment-variable, you can control server access with the value set for the environment variable. You can restrict access based on the HTTP request header field if you use this directive in combination with the BrowserMatch, BrowserMatchNoCase, SetEnvIf, and the SetEnvIfNoCase directive.
You can use the Order directive to set the evaluation order of the Allow directive (access permission) and Deny directive (access restriction).
Host | Meaning |
---|---|
Domain name | Permit the access from the host specified in the domain name. |
IP address | Permit the access from the host specified in the IP address. |
Subnet | Permit the access from the host specified in the subnet (First three bytes of the IP address) |
Netmask | Permit the access from the host specified in the netmask notation (example: 10.1.0.0/255.255.0.0). When the notation is in 10.1.0.0/16 format, it means same as 10.1.0.0/255.255.0.0. |
<Directory>, .htaccess
Limit level
SetEnvIf User-Agent Mozilla.* access_ok
<Directory /docroot>
Order deny,allow
Deny from all
Allow from env=access_ok
</Directory>
allow from 2001::123:4567:89ab:cdef
allow from 2001:0:0:89ab::/64
allow from 2001:0:0:89AB::/64
allow from 2001::89ab:0:0:0:0/64
allow from 2001:0000:0000:89ab:0000:0000:0000:0000/64
~<<All>>
The AllowOverride directive specifies whether overwriting of the access information definition with the file specified in AccessFileName directive is permitted. For directives that can be controlled by each directive, see the description of the overwrite permissions for each directive.
Directive | Contents |
---|---|
AuthConfig | AuthGroupFile, AuthName, AuthType, AuthUserFile, and Require directives Permits overwriting of the directives related to the access control of server |
FileInfo | AddType, AddEncoding, and AddLanguage directives Permits overwriting of the directives related to file information such as contents management, MIME type, and encryption |
Indexes | FancyIndexing, AddIcon, and AddDescription directives Permits overwriting of the directives related to directory index |
Limit | Allow from, Deny from, and Order directives Permits overwriting of the access control using the host name or the IP address |
Options | Permits the use of Options directory |
All | Permits overwriting of all the directives |
None | Prohibits overwriting of all the directives |
<Directory>
The AuthAuthoritative directive specifies the controlling methods for the user authentication.
On: Performs the users authentication as per the settings of AuthUserFile, AuthGroupFile, and Require directives. When the user is not registered or when the password does not match, an error status 401 is displayed in the Web browser.
Off: Performs the users authentication as per the setting of AuthUserFile, AuthGroupFile, and Require directive. In such cases, if the password is incorrect, an error status 401 is displayed in the Web browser. If the user is not registered, performs the user authentication using the modules (functionality) of other products.
<Directory>, .htaccess
AuthConfig level
When performing the user authentication in groups, the AuthGroupFile directive specifies a file name that stores the list of the groups to be authenticated. In the file name, you can specify the absolute path or the relative path from the specification value of the ServerRoot directive.
Create the group file in the following format using a text editor:
<Directory>, .htaccess
AuthConfig level
Specify the realm name (displayed in the user authentication screen of the Web browser) when performing the user authentication. When you specify this directive, you must specify AuthType, Require, and AuthUserFile (or AuthGroupFile) directives. However, when performing the user authentication with the directory service, you need not specify AuthUserFile (or AuthGroupFile) directive.
<Directory>, .htaccess
AuthConfig level
The AuthType directive specifies the authentication control type when performing the user authentication. You can specify "Basic" as the authentication type. When you specify this directive, you must specify AuthName, Require, and AuthUserFile (or AuthGroupFile) directives. However, when performing the user authentication with the directory service, you need not specify the AuthUserFile (or AuthGroupFile) directive.
Basic: Converts the Base64 code.
<Directory>, .htaccess
AuthConfig level
When you authenticate the user with the user name, specify the name of the file that stores the list of the user names and the passwords to be authenticated.
Specify the file name with an absolute path or the relative path from the value specified for the ServerRoot directive.
<Directory>, .htaccess
AuthConfig level