6.2.2 Directives starting with A
- Organization of this subsection
-
-
(5) AddAltByEncoding "character-string" MIME-encoding [MIME-encoding ...]
-
(6) AddAltByType "character-string" MIME-type [MIME-type ...]
-
(9) AddDescription "character-string" file-name [file-name ...]
-
(12) AddIcon {(character-string, URL) | URL} extension [extension ...]
-
(13) AddIconByEncoding {(character-string, URL) | URL} MIME-encoding [MIME-encoding ...]
-
(14) AddIconByType {(character-string, URL) | URL} MIME-type [MIME-type ...]
-
(19) Allow from {host | all | env = environment-variable} [{Host | env = environment-variable} ...]
(1) AccessFileName file-name [file-name ...]
~<<.htaccess>>
(a) Contents
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.
(b) Location where you can code
httpsd.conf, <VirtualHost>
(c) Specification example
AccessFileName .htaccess
The file name of the access control file is .htaccess.
(2) AllowEncodedSlashes {On | Off}
(a) Contents
The AllowEncodedSlashes directive specifies whether to permit the use of URLs that contain encoded path characters. If the use of such URLs is not permitted, the status code 404 Not Found is returned to the client. Encoded path characters are %2F and %5C in Windows, and %2F in UNIX. Note that %2F corresponds to a forward slash (/) and %5C corresponds to a backslash (\).
On: Encoded path characters are permitted.
Off: Encoded path characters are not permitted.
(b) Location where you can code
httpsd.conf, <VirtualHost>
(c) Specification example
AllowEncodedSlashes On
(3) Action {MIME-type | Handler} CGI-script-name
(a) Contents
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.
(b) Location where you can code
httpsd.conf, <VirtualHost>, <Directory>, .htaccess
(c) Overwrite permission
FileInfo level
(d) Specification example
Action image/gif /cgi-bin/images.cgi
(4) AddAlt "character-string" extension [extension ...]
(a) Contents
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:
-
File extension
-
File name or file extension with wild card notation
-
File name
When performing multiple specifications of this directive, you cannot specify different character strings with the same extension.
(b) Location where you can code
httpsd.conf, <VirtualHost>, <Directory>, .htaccess
(c) Overwrite permission
Indexes level
(d) Specification example
AddAlt "HTML" htm html
When the file extension is htm or html, the character string "HTML" is displayed.
(5) AddAltByEncoding "character-string" MIME-encoding [MIME-encoding ...]
(a) Contents
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.
(b) Location where you can code
httpsd.conf, <VirtualHost>, <Directory>, .htaccess
(c) Overwrite permission
Indexes level
(d) Specification example
AddAltByEncoding "gzip" x-gzip
(6) AddAltByType "character-string" MIME-type [MIME-type ...]
(a) Contents
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.
(b) Location where you can code
httpsd.conf, <VirtualHost>, <Directory>, .htaccess
(c) Overwrite permission
Indexes level
(d) Specification example
AddAltByType "plain text" text/plain
(7) AddCharset character-set extension [extension ...]
(a) Contents
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
(b) Location where you can code
httpsd.conf, <VirtualHost>, <directory>, .htaccess
(c) Overwrite permission
FileInfo level
(d) Specification example
AddCharset EUC-JP .euc AddCharset ISO-2022-JP .jis AddCharset SHIFT_JIS .sjis
(8) AddDefaultCharset [On | Off | character-set]
(a) Contents
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.
(b) Location where you can code
httpsd.conf, <VirtualHost>, <directory>, .htaccess
(c) Overwrite permission
FileInfo level
(d) Specification example
AddDefaultCharset ISO-2022-JP
(9) AddDescription "character-string" file-name [file-name ...]
(a) Contents
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 forward 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:
-
File extension
-
File name with the wild card notation
-
File name
When performing multiple specifications of this directive, you cannot specify different character strings for the same file name.
(b) Location where you can code
httpsd.conf, <VirtualHost>, <Directory>, .htaccess
(c) Overwrite permission
Indexes level
(d) Specification example
AddDescription "The planet Mars" /web/pics/mars.gif
(10) AddEncoding compression-format-extension
(a) Contents
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.
(b) Location where you can code
httpsd.conf, <VirtualHost>, <Directory>, .htaccess
(c) Overwrite permission
FileInfo level
(d) Specification example
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
(11) AddHandler handler-name extension [extension]
(a) Contents
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
(b) Location where you can code
httpsd.conf, <VirtualHost>, <Directory>, .htaccess
(c) Overwrite permission
FileInfo level
(d) Specification example
AddHandler cgi-script .cgi Extension.cgi is cgi-script handler AddHandler imap-file map Extension map is imap-file handler
(12) AddIcon {(character-string, URL) | URL} extension [extension ...]
(a) Contents
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:
-
File extension
-
File extension or the file name with wild card notation
-
File name
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.
(b) Location where you can code
httpsd.conf, <VirtualHost>, <Directory>, .htaccess
(c) Overwrite permission
Indexes level
(d) Specification example
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
(13) AddIconByEncoding {(character-string, URL) | URL} MIME-encoding [MIME-encoding ...]
(a) Contents
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.
(b) Location where you can code
httpsd.conf, <VirtualHost>, <Directory>, .htaccess
(c) Overwrite permission
Indexes level
(d) Specification example
AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
Icon definitions for MIME encoding x-compress and x-gzip
(14) AddIconByType {(character-string, URL) | URL} MIME-type [MIME-type ...]
(a) Contents
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.
(b) Location where you can code
httpsd.conf, <VirtualHost>, <Directory>, .htaccess
(c) Overwrite permission
Indexes level
(d) Specification example
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/*
(15) AddLanguage language-code extension
(a) Contents
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.
(b) Location where you can code
httpsd.conf, <VirtualHost>, <Directory>, .htaccess
(c) Overwrite permission
FileInfo level
(d) Specification example
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
(16) AddType MIME-type extension [extension ...]
(a) Contents
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.
(b) Location where you can code
httpsd.conf, <VirtualHost>, <Directory>, .htaccess
(c) Overwrite permission
FileInfo level
(d) Specification example
AddType text/html .shtml
Associate the MIME type text/html with the extension .shtml.
(17) Alias URL directory-name
(a) Contents
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:
-
ProxyPass path name
-
JkMount URL patterns in the redirector definition file
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.
(b) Location where you can code
httpsd.conf,<VirtualHost>
(c) Specification example
Alias /icons/ "Application-Server-installation-directory/httpsd/icons/"
Replace /icons/ with Application-Server-installation-directory/httpsd/icons/.
(18) AliasMatch regular-expression new-path
(a) Contents
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:
-
ProxyPass path name
-
JkMount URL patterns in the redirector definition file
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.
(b) Location where you can code
httpsd.conf,<VirtualHost>
(c) Specification example
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.
(19) Allow from {host | all | env = environment-variable} [{Host | env = environment-variable} ...]
(a) Contents
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. |
(b) Location where you can code
<Directory>, .htaccess
(c) Overwrite permission
Limit level
(d) Specification example
- (Example 1)
SetEnvIf User-Agent Mozilla.* access_ok <Directory /docroot> Order deny,allow Deny from all Allow from env=access_ok </Directory>In this case, access is permitted only to the browser requests in which the User-Agent character string contains Mozilla, and access is denied to all other requests.
- (Example 2)
-
When specifying an IPv6 address for a host, the directive is coded as follows:
allow from 2001::123:4567:89ab:cdef
When specifying a prefix length, all of the following settings are identical:
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
(20) AllowOverride directive [directive ...]
~<<None>>
(a) Contents
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 content management and MIME type |
|
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 |
(b) Location where you can code
<Directory>
(22) AuthGroupFile file-name
(a) Contents
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:
- group-name: user-name [ user-name ...]
-
User names registered in the password file for user authentication are defined in a group name of your choice. Specify one group per line. You can define multiple groups in the group file. If you specify the same group name on multiple lines, a single group is defined that includes all of the user names that are registered to the same group name.
(b) Location where you can code
<Directory>, .htaccess
(c) Overwrite permission
AuthConfig level
(23) AuthName realm-name
(a) Contents
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.
(b) Location where you can code
<Directory>, .htaccess
(c) Overwrite permission
AuthConfig level
(24) AuthType authentication-type-name
(a) Contents
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.
(b) Location where you can code
<Directory>, .htaccess
(c) Overwrite permission
AuthConfig level
(25) AuthUserFile file-name
(a) Contents
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.
(b) Location where you can code
<Directory>, .htaccess
(c) Overwrite permission
AuthConfig level