Hitachi

uCosminexus Application Server HTTP Server User Guide


6.2.8 Directives starting with T and U

Organization of this subsection

(1) ThreadLimit number-of-threads [Figure]

~((1 - 15000))<<1024>>

(a) Contents

The ThreadLimit directive specifies the upper limit for the number of server threads to be generated for a server process. According to the value specified in this directive, the shared memory area that stores server operation information is allocated. Therefore, if you specify a value larger than the number of server threads that actually run (specified in the ThreadsPerChild directive), an unused extra shared memory area is allocated. We recommend that you specify the same value in this directive and the ThreadsPerChild directive.

Do not specify unnecessarily large values for this directive and the ThreadsPerChild directive. If the specified values are too large for the system to handle, the Web server might not be able to start or might become unstable.

You cannot change the value specified in this directive by simply restarting the server. To change the specified value, stop and then restart the Web server.

(b) Location where you can code

httpsd.conf

(2) ThreadLimit number-of-threads [Figure]

~((1 - 1000))<<64>>

(a) Contents

The ThreadLimit directive specifies the upper limit for the number of server threads to be generated in a server process. According to the value specified in this directive, the shared memory area that stores server operation information is allocated. Therefore, if you specify a value larger than the number of server threads that actually run (specified in the ThreadsPerChild directive), an unused extra shared memory area is allocated. We recommend that you specify the same value in this directive and the ThreadsPerChild directive. If different values are specified in those directives, the Web server might not be able to start or might become unstable.

You cannot change the value specified in this directive by simply restarting the server. To change the specified value, stop and then restart the Web server.

You can specify this directive when using the worker MPM.

(b) Location where you can code

httpsd.conf

(3) Timeout time

~((0 - 65535))<<60>> (Unit: Seconds)

(a) Contents

The Timeout directive specifies the following waiting times in seconds. If 0 is specified, the waiting time is 0 seconds.

  • When the Web server is receiving requests from the client, this directive specifies the waiting time for receiving the request when the data is not received (receiving the HTTP protocol after establishing the connection).

  • When the Web server is sending a response to the client, this directive specifies the waiting time for sending the response when the data cannot be sent.

  • When the Web server is sending a request to a CGI program, this directive specifies the waiting time for sending the request when the data cannot be sent.

  • The waiting time for receiving a response after sending the request to a CGI program.

  • When the Web server is receiving the response from CGI program, this directive specifies the waiting time to receive the request when the data is not received.

  • The waiting time after receiving a response from the CGI program until the I/O pipe is closed

  • When using a reverse proxy, the waiting time after data could not be transmitted while sending a request to the backend server

  • When using a reverse proxy, the waiting time until a response is received after a request is sent to the backend server

  • When using a reverse proxy, the waiting time after data could not be received while receiving a request from the backend server

(b) Location where you can code

httpsd.conf

(c) Specification example

Timeout 300

(4) ThreadsPerChild number-of-threads [Figure]

~((1 - value-specified-in-ThreadLimit-directive)<<64>>

(a) Contents

This directive specifies the number of threads to be started as a server. The number of specified threads denotes the maximum number of concurrent server connections.

(b) Location where you can code

httpsd.conf

(5) ThreadsPerChild number-of-threads [Figure]

~((1 - value-specified-in-ThreadLimit-directive))<<25>>

(a) Contents

This directive specifies the number of server threads to be created in one server process.

You can specify this directive when using the worker MPM.

(b) Location where you can code

httpsd.conf

(6) TraceEnable {On | Off | extended}

(a) Contents

This directive specifies whether to deny the requests from the TRACE method.

On: Grants permission to the request from the TRACE method. However, when the request body is added, the Web server responds with the status code 413 Request Entity Too Large.

Off: Denies the request from the TRACE method. When request is from the TRACE method, the Web server responds with the status code 403 Forbidden.

Extended: Grants permission to requests from the TRACE method. Grants permission even if the request body has been added. However, the upper limit of the size of request bodies other than request bodies from a reverse proxy is 64 KB.

(b) Location where you can code

httpsd.conf, <VirtualHost>

(c) Specification example

TraceEnable Off

(7) TransferLog {file-name | pipe}

(a) Contents

This directive specifies a file in which the log is stored or a program that outputs log. You can specify the log format with the LogFormat directive that does not specify a label name.

If you specify the log format in the LogFormat directive, an IPv6 address and the host name corresponding to the IPv6 address can be output. For details on the formats that you can specify, see the CustomLog directive.

If the log format is not specified in the LogFormat directive, the log is output in a standard log format.

file-name: Specifies a file name that stores the log. In file name, you can specify the absolute path or the relative path from the specified value of the ServerRoot directive.

pipe: Specifies a program that receives the log information from the standard input in "| Program name" format. For more details regarding the notes on Windows version, see CustomLog directive.

(b) Location where you can code

httpsd.conf, <VirtualHost>

(c) Specification example

TransferLog "|[Figure]"[Figure]"Application-Server-installation-directory/httpsd/sbin/rotatelogs.exe[Figure]" [Figure] "Application-Server-installation-directory/httpsd/logs/access[Figure]" 86400[Figure]""

Use the rotatelogs program to divide and collect the log every 24 hours.

(8) TypesConfig file-name

~<<conf/mime.types>>

(a) Contents

This directive specifies the settings file that defines the relationship between the file extension and contents type (MIME type). In file name, you can specify the absolute path or the relative path from the specified value of the ServerRoot directive.

The specification format in the settings file is MIME-type file-extension [file-extension ...]. A line in which only a MIME type is specified will be ignored. A line that begins with a hash mark (#) will be a comment line.

(b) Location where you can code

httpsd.conf

(c) Specification example

TypesConfig conf/mime.types

The settings file for MIME types is mime.types

(9) UnsetEnv environment-variable [environment-variable ...]

(a) Contents

The UnsetEnv directive specifies the environment variables to delete from the environment variables to be passed to CGI scripts that are specified in the SetEnv or PassEnv directive.

(b) Location where you can code

httpsd.conf, <VirtualHost>, <Directory>, .htaccess

(c) Overwrite permission

FileInfo level

(d) Specification example

UnsetEnv MY_ENV

(10) UseCanonicalName {On | Off | dns}

(a) Contents

This directive specifies the generation method of the standard name of the server. The standard name of the server is set in the URL and the SERVER_NAME and SERVER_PORT of the environment variable that refer to local server.

On: The standard name of server is created from the ServerName directive value and is set in the URL and environment variable that refer to the local server. When you use the IP address to specify the VirtualHost, specify the ServerName in the VirtualHost block. When the ServerName is not specified in the block, acquire the host name from the IP address.

Off: The standard name of the server is created from the host name and the port number that is provided from the client by the Host header, and is set in the URL and environment variable that refers to the local server. However, when Host header is not provided, the standard name is created using the ServerName directive and the port name that is used in the actual connection.

dns: This option is for the old client that does not have the Host header. When specifying this option, the standard name of the sever is created using the host name extracted from the server ip address received from the client and the port number used in the actual connection, and set in the URL and environment variable that refers to the local server.

Note that IPv6 addresses are supported when the On, Off, or dns option is selected.

(b) Location where you can code

httpsd.conf, <VirtualHost>, <Directory>

(11) User user-name [Figure]

~<<#-1>>

(a) Contents

This directive specifies the user name when server process is running.

(b) Location where you can code

httpsd.conf

(c) Specification example

User nobody

(12) UserDir {directory-name | disabled [user-name [user-name ...]]}

(a) Contents

This directive specifies a location on the server that is released for the request to /~user name/ from the Web browser as the directory name. When you set this directive as disabled, you can specify the user to whom the Web contents are not disclosed.

Specify the directory name using the relative path or the absolute path.

In Windows version, only the absolute path is valid.

directory-name:

  • When specified by the relative path

    This option specifies a location when the users with the user IDs on the server release the Web contents under the user home directory. When there is a request for the /~user name/, the Web server accesses the "home directory of user/directory name".

  • When specified by absolute path

    This option specifies a location for the user directory. When there is a request for /~user name/, the Web server accesses the "directory name/user name".

disabled:

This option specifies a user that does not release Web contents for the request to the /~user name/ from Web browser. The directory name to be accessed is not changed for the request of the specified user name. When the user name is not specified, disabled is set for all users.

(b) Note

  • When you specify the directory name using multiple UserDir directives, the directory name specified later overwrites the earlier specifications.

  • You can specify the user names to be specified in disabled using multiple UserDir directives.

(c) Location where you can code

httpsd.conf, <VirtualHost>

(d) Specification example

(Example 1)
UserDir public_html

If home directory of user user1 is /home/user1, access /home/user1/public_html/index.html in the request http://host name [:port number]/~user1/index.html.

(Example 2)
UserDir /home
UserDir disabled user3
UserDir disabled user4 user5

Access /home/user1/index. html in the request http://host name [:port number]/~user1/index.html. However, you cannot access /home/user3/index.html in the requests http://host name [:port number]/~user3/index.html, since user3 is disabled. The access regarding user4 and user5 are similar to user3.

(Example 3)
UserDir disabled

Specify disabled for all users.