~<<*>>
The BindAddress directive specifies the IP address to which the Web server can be connected, from the allocated IP addresses in the server machine on which the Web server is installed. An IPv6 address cannot be specified for IP-address. To enable connection to the Web server from any IPv4 address, specify an asterisk (*). If you specify the Listen directive, the specification of the BindAddress directive is ignored.
httpsd.conf
Specify the BrowserMatch directive when you set the environment variables for each Web browser. Default setting value is 1. When ! (exclamation mark) is added before the environment variable, the settings of that environment variable are cancelled. You can specify the case sensitive browser names with the regular expressions.
httpsd.conf, <VirtualHost>, <Directory>, .htaccess
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully
BrowserMatch "^gnome-vfs" redirect-carefully
The meaning of environment variables shown in the specification example is as follows:
Environment variable | Contents |
---|---|
nokeepalive | This environment variable disables the KeepAlive connection. You cannot disable the KeepAlive connection when Via header is added in the request. |
downgrade-1.0 | This environment variable handles the requests of HTTP/1.1 and above as requests of HTTP/1.0. |
force-response-1.0 | This environment variable always responds with HTTP/1.0 to the requests of HTTP/1.0. |
redirect-carefully | When accessing the directory if '/' is not added at the end of the URL, and a method other than the GET method is used, redirect is not requested to the client. |
Specify the BrowserMatchNoCase directive when you set the environment variables for each Web browser. The default value is 1. When ! (exclamation mark) is added before the environment variable, the settings of that environment variable are cancelled. You can specify the browser name with the regular expressions, and the browser name is not case sensitive.
httpsd.conf, <VirtualHost>, <Directory>, .htaccess
The CacheNegotiatedDocs directive specifies whether to enable cache in the client during the request for content negotiation. When you omit the directive arguments, the Web server operates in the same manner as when On was specified. If you do not specify the directive, the Web server operates in the same manner as when Off was specified. The specification of this directive is invalid for the HTTP/1.1 requests.
On: Contents are cached.
Off: Expires header is added and contents are not cached.
httpsd.conf
~<<ServerRoot directive specified value>>
The CoreDumpDirectory directive specifies the directory for the core dump. You can specify the absolute path or the relative path from the specified value of the ServerRoot directive. Note that the specified directory must have write access to the users and groups that are specified in the User and Group directives. In the Linux version, this directive is applied only when it is specified in the configuration file.
In HP-UX, core dumps for user ID changes are not output. If Cosminexus HTTP Server is started by a superuser, the user is changed to the user specified by the User directive. Because of this, no core dump is output even if an error that normally results in a core dump occurs.
httpsd.conf
Specify the CustomLog directive when the log in any format is to be output to the file. The format is similar to the one that is specified in the LogFormat directives.
When specifying multiple specifications of this directive, you cannot specify the same file name multiple times.
file-name: Specifies the log file name. In the file name, you can specify the absolute path or the relative path from the specified value of the ServerRoot directive.
pipe: Specifies the program that receives log information from the standard input in the "| Program name" format. The Web server converts the linefeed codes contained in the log information to CRLF and passes it on.
(Notes for Windows version)
Each program specified in the pipe is generated as a separate process that receives the log information for the control process and Web server process. This process is called the Pipe process. Note the following points when you start the Web server as a service:
"Format": Specifies the log format. the following tables describe the formats that you can specify.
label-name: Specifies the label name that is specified in the LogFormat directive.
env=environment-variable: Collects the log when the specified environment variable is set.
env=!environment-variable: Collects the log when the specified environment variable is not set.
Table 6-3 The format list
Format | Meaning |
---|---|
%A#1 | IP address of the Web server. |
%a#1 | IP address of the client. |
%B | Number of bytes sent (excluding the data added by the HTTP header and chunked encoding). |
%b | Number of bytes sent (excluding the data added by the HTTP header and chunked encoding). However in the case of 0, - (hyphen). |
%{cookie_name}C | Value of the cookie name cookie_name included in the Cookie header value.When multiple instances of cookie_name are found in the Cookie header value, all values are output. |
%D | Display the request processing time in microseconds. |
%{env_name}e | Value of the environment variables specified in env_name. |
%f | Directory or the file name requested by the client. |
%H | Request protocol (such as HTTP/1.0). |
%h | Host name of the client. |
%I | Total number of bytes received including the request and the header. |
%{header_name}i | Value of the request header specified in header_name. |
%l | Identification information of the client (when IdentityCheck directive is On, and identd is running on the client). |
%m | Request method (such as GET, POST). |
%{note_name}n | Value of the note of Web server module specified in the note_name. |
%O | Total number of bytes sent including header. |
%{header_name}o | Value of the response header specified in header_name. |
%P | Process ID that processes the request of HTTP communication. |
%{hws_thread_id}P | Thread ID that processes the request of HTTP communication. Valid for Windows version. |
%p | Port number. |
%q | Query character string. |
%r | First line of the HTTP communication request. |
%s | Status (for the logs that are internally redirected, original status is shown). |
%T | Time taken for request processing (seconds). If On is specified in the HWSLogTimeVerbose directive, then time is displayed up to milliseconds. |
%t | Time when request processing starts. If On is specified in the HWSLogTimeVerbose directive, then time is displayed up to milliseconds. |
%{format}t | Time when request processing starts. The format defined by strftime() is specified in format. |
%U | The URL. |
%u | User name of client (when the user authentication is performed). |
%V | The ServerName directive specification value, server name, or IP address as per the specifications of the UseCanonicalName directive. |
%v | Server name. |
%X | Connection status when the response ends. +: Connected even after sending the response. -: Disconnected after sending the response. X: Disconnected before the response ends. |
%>s | End status. |
Table 6-4 The log format list related to SSL
Format | Meaning |
---|---|
%{version}c | SSL version |
%{cipher}c | Encryption type used in the current communication |
%{clientcert}c | Distinguished Name of the subject of the SSL client certificate. |
You can describe the status code after the % in the format.
%400,501 {User-Agent}i
%!200,304,302 {Referer}i
Specify env= when you divide the log collection as per the settings of the specified environment variables.
SetEnvIf Request-URI \.gif$ gif-image
CustomLog logs/gif.log common env=gif-image
CustomLog logs/nongif.log common env=!gif-image
httpsd.conf,<VirtualHost>
CustomLog logs/access.log common
CustomLog logs/ssl.log "%t %{version}c %{cipher}c %{clientcert}c"
The DefaultIcon directive specifies the icons displayed in the directory index. Specify the URL of the icon to be displayed when the specified icons do not correspond to any of the AddIcon, AddIconByType, and the AddIconByEncoding directives.Note that if you specify the IPv6 address without omitting http://IP-address of the URL, enclose the IPv6 address in square brackets ([ ]).
httpsd.conf, <VirtualHost>, <Directory>, .htaccess
Indexes level
DefaultIcon /icons/unknown.gif
The DefaultLanguage directive specifies the default language used in the document. The specified language code is set in the Content-Language response header. The specified language code becomes the default value for the settings of the AddLanguage directive. If the default value is not set, the response header of the Content-Language is not sent.
httpsd.conf, <VirtualHost>, <directory>, .htaccess
FileInfo level
~<<text/plain>>
The DefaultType directive specifies the MIME type name used for the contents that do not correspond to any of the MIME types defined in the file specified with the TypesConfig directive.
httpsd.conf, <VirtualHost>, <Directory>, .htaccess
FileInfo level
DefaultType text/plain
Specify the 'Deny from' directive when restricting the clients that can access the Web server. In the host, you can specify the domain name, IP address, subnet, and the netmask of the host that permits the access. Specify all when prohibiting the access from all 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 for the Allow directive (access permission) and the Deny directive (access restriction).
Host | Meaning |
---|---|
Domain name | Prohibit access from the host displayed in the domain name |
IP address | Prohibit access from the host displayed in the IP address |
Subnet | Prohibit access from the host specified in the subnet (First three bytes of the IP address). |
Netmask | Prohibit access from the host specified in the netmask (Example: 10.1.0.0/255.255.0.0). If the notation is in 10.1.0.0/16 format, it means same as 10.1.0.0/255.255.0.0. |
<Directory>, and .htaccess
Limit level
~<<index.html>>
When the requests from the Web browser do not specify any specific contents, the DirectoryIndex directive specifies the default file name of the contents to be sent to the client. If you specify multiple file names, file name specified first will be sent first.
When the specified file is not present in the requested directory, the Web browser display changes according to the Options directive.
httpsd.conf,<VirtualHost>,<Directory>,.htaccess
Indexes level
DirectoryIndex index.html
If a file name is not specified in the request, display index.html file if present in the directory).
~<</opt/hitachi/httpsd/htdocs>> (UNIX version)
~<<ServerRoot directive default value/htdocs>> (Windows version)
The DocumentRoot directive specifies the document root directory that stores the contents, with an absolute path. Do not add / (slash) at the end of the directory name.
Specify the directory name with an absolute path.
httpsd.conf, <VirtualHost>
DocumentRoot "<Cosminexus-installation-directory>/httpsd/htdocs"