SERVER Section

In the SERVER section, you can configure connection information (Port, SSL, etc.) that allows WebtoB to receive client requests.

Each protocol that WebtoB can handle must be set in the SERVER section.

WebtoB provides SERVER types such as 'http', 'wjp', and 'admin', each of which can be configured in detail.

Configuration Items

The following is the configuration format of the SERVER section.

"server": {
    "http": {
        #"common_config": {                             # COMMON
            #"doc_root": string,                        # "docs/", $ENV, R.PATH
            #"error_document": [string],
            #"enable_keepalive": boolean,               # true
            #"keepalive_timeout": integer,              # 60 (1-3600)
            #"keepalive_max": integer                   # 0 (0-INT_MAX)
            #"keepalive_error_status_code": [integer]
            #"service_order": string,                   # "uri,ext"
            #"access_log": string
            #"headers": [string]
            #"enable_dos_block": boolean                # false
            #"dos_block_table_size": integer            # 3097 (1-INT_MAX)
            #"dos_block_page_count": integer            # 5 (0-INT_MAX)
            #"dos_block_page_interval": integer         # 1 (1-INT_MAX)
            #"dos_block_site_count": integer            # 50 (0-INT_MAX)
            #"dos_block_site_interval": integer         # 1 (1-INT_MAX)
            #"dos_block_period": integer                # 30 (1-INT_MAX)
            #"dos_block_white_list": [string]
            #"url_rewrite_config": string
            #"alias": [string]
            #"index_name": string                       # "index.html"
            #"filters": [string]
            #"rpaf_header": string
            #"enable_directory_index": boolean          # true
        },
        "http_servers": [
            {
                #"common_config": {...},                # COMMON
                "name": string,
                #"port": integer,                       # 80 | 443 (1-65535)
                #"enable_ssl": boolean,                 # false
                #"ssl_name": [string],
                #"idle_timeout": integer                # 300 (1-3600)
                #"initial_connection_timeout": integer  # 10 (0-INT_MAX)
                #"request_header_timeout": integer      # 60 (0-INT_MAX)
                #"request_body_timeout": integer        # 0 (0-INT_MAX)
                #"idle_timeout_status": integer         # 500 (511-599)
                #"vhosts": [
                    {
                        #"common_config": {...},        # COMMON
                        "name": string,
                        "host_name": [string]
                    }
                ]
            }
        ],
        #"mime_type_file": string,                      # "mime.types"
        #"default_mime_type": string                    # "text/html"
    },
    #"wjp": {
        "wjp_servers": [
            {
                "name": string,
                #"min_proc": integer,                   # 1 (1-INT_MAX)
                #"max_proc": integer,
                #"svr_chk_time": integer                # 60 (0-3600)
                #"flow_control": integer                # 50 (1-INT_MAX)
                #"max_jengine_count": integer           # 64 (1-INT_MAX)
                #"ping_timeout_status": integer         # 503 (511-599)
            }
        ],
        #"port": integer,                               # 9900 (1-65535)
        #"enable_ssl": boolean,                         # false
        #"ssl_name": string
    }

    #"admin": {
        #"port": integer                                # 9090 (1-65535)
        #"access_log": string
    }

    #"tcp": {
        "tcp_servers": [
            {
                "name": string
                "port": integer                         # (1-65535)
                "server_address": [string]
                #"idle_timeout": integer                # 300 (0-INT_MAX)
                #"initial_connection_timeout"           # 10 (0-INT_MAX)
            }
        ]
    }

Refer to Types of Setting Values and Configuration Methods for more information on symbols and details of the SERVER section configuration items.

http (Required)

Sets the connection information for processing HTTP requests.

Item Description

Data Type

Object

http/common_config

A common setting for HTTP servers. If set in the parent item, the settings will be reflected to the child items without the need for additional configuration.

Item Description

Data Type

Object

Priority

The priority of the setting is as follows:

  1. vhosts

  2. http_servers

  3. http

http/common_config/doc_root

Specifies the top-level path of the documents served by WebtoB.

Environment variables can be used. If a relative path is set, it will be converted to an absolute path based on $WEBTOB6_HOME_PATH.

Item Description

Data Type

String

Range

Up to 255 characters

Default Value

"docs"

The following is an example of setting doc_root:

  "server": {
    "http": {
      "common_config": {
        "doc_root": "docs",
}

If doc_root is set in both common_config and http_servers, the setting in http_servers will take precedence over that in common_config.

http/common_config/error_document

Specifies the use of a user specified page instead of the HTTP error page. Configure the names in the ERRORDOCUMENT section.

Item Description

Data Type

Array(string)

Range

Up to 64 items (within 255 characters)

The following is an example of setting error_document. In this case, the name of the error_document must be written in string format, and the error_document must be specified in the error_document section.

  "server": {
    "http": {
      "common_config": {
        "error_document": ["error1"]
  ...
  "error_document": {
    "error_document_list": [
      {
        "name": "error1",
        "status": 404,
        "url": "/htmls/not_found.html"
      }
    ]
  },

http/common_config/enable_keepalive

Sets whether to use Keepalive (HTTP persistent connection).

Item Description

Data Type

Boolean

Default Value

True

The following describes each configuration value.

Value Description

True

Users can reuse connections to handle multiple requests with a single connection.

False

Users must reconnect the socket every time to process a request.

The following is an example of setting enable_keepalive. To configure keepalive_timeout and keepalive_max, enable_keepalive must be set to true.

  "server": {
    "http": {
      "common_config": {
        "enable_keepalive": true,
        "keepalive_timeout": 60,
        "keepalive_max":0,
      },

http/common_config/keepalive_timeout

Specifies the time period during which Keepalive remains active. After the user request has been processed, the connection is disconnected after the specified time.

Item Description

Data Type

Integer

Unit

seconds

Range

1 ~ 3600

Default Value

60

The following is an example of setting keepalive_timeout.

  "server": {
    "http": {
      "common_config": {
        "enable_keepalive": true,
        "keepalive_timeout": 10,
        "keepalive_max":0,
      },

The connection time can be checked through Idle_time in ci of wsadmin. When called from a browser, the connection may be terminated before the keepalive_timeout setting value because each browser has its own connection time policy.

[wsadmin]>> ci
---------------------------------------------------------------------------------------------------------------------------------
| HTH-0 : Connection info                                                                                                       |
---------------------------------------------------------------------------------------------------------------------------------
| No | Server |    Local Address    |   Remote Address    | Remote Type | Ssl | Status | Request Count | Idle Time | Mapping No |
---------------------------------------------------------------------------------------------------------------------------------
| 5  | http1  | 192.168.0.1:80 | 192.168.0.51:50965 |   CLIENT    | No  | READY  |       0       |     7     |     -1     |
---------------------------------------------------------------------------------------------------------------------------------

http/common_config/keepalive_max

Specifies when to limit the Keepalive request count.

Item Description

Data Type

Integer

Range

0 ~ INT_MAX

Default Value

0

The following describes each configuration value.

Value Description

0

No limit on the number of requests.

The following is an example of setting keepalive_max:

  "server": {
    "http": {
      "common_config": {
        "enable_keepalive": true,
        "keepalive_timeout": 60,
        "keepalive_max":2,
      },

The number of connections can be checked through Request Count in ci of wsadmin.

[wsadmin]>> ci
---------------------------------------------------------------------------------------------------------------------------------
| HTH-0 : Connection info                                                                                                       |
---------------------------------------------------------------------------------------------------------------------------------
| No | Server |    Local Address    |   Remote Address    | Remote Type | Ssl | Status | Request Count | Idle Time | Mapping No |
---------------------------------------------------------------------------------------------------------------------------------
| 5  | http1  | 192.168.0.1:80 | 192.168.0.51:50965 |   CLIENT    | No  | READY  |       0       |     7     |     -1     |
---------------------------------------------------------------------------------------------------------------------------------

http/common_config/keepalive_error_status_code

Specifies the HTTP status code to use when the user connection is kept alive (persistent connection, keep-alive) after sending an error response.

Item Description

Data Type

Array (integer)

Range

Up to 64 items (300 - 303 | 305 - 599)

Normally, if WebtoB sends an error response with status code of 3xx (excluding "304 Not Modified"), 4xx, or 5xx, the client connection is terminated. However, if WebtoB sends a status code specified in this option, the client connection is maintained.

The following is an example of WebtoB keeping the connection with client alive after responding with either a "302 Found" or "404 Not Found" message.

  ...
  "server": {
    "http": {
      "common_config": {
        "enable_keepalive": true,
        "keepalive_timeout": 60,
        "keepalive_max":0,
        "keepalive_error_status_code": [302, 404],
      },
  ...

http/common_config/service_order

Sets the priority between URI and EXT in the SERVICE section when determining the Destination to process the user request.

Item Description

Data Type

String

Range

"uri,ext" | "ext,uri"

Default Value

"uri,ext"

The following describes each configuration value.

Value Description

uri,ext

Checks the URI section configuration first. If the configuration does not exist, check the EXT section configuration.

ext,uri

Checks the EXT section configuration first. If the configuration does not exist, check the URI section configuration.

If neither option is specified, the default HTML service (Worker Thread) processes the request.

The following is an example of setting service_order.

  ...
  "server": {
    "http": {
      "common_config": {
        "service_order: : "uri,ext"
      },
  ...

http/common_config/access_log

Specifies the LOGGING section name corresponding to the access log.

Item Description

Data Type

String

Range

Up to 255 characters

The following is an example of setting access_log. The access_log specified in the setting must be defined in the access_log entry of the logging section.

  ...
  "server": {
    "http": {
      "common_config": {
        "access_log": "access_log1"
      },
      ...
  "logging": {
    "access_log": [
      {
        "name": "access_log1",
        "level": "INFO",
        "format": "DEFAULT",
        ...
  ...

http/common_config/headers

Sets the name of the HEADERS section to apply.

Item Description

Data Type

Array (string)

Range

Up to 15 items (within 255 characters)

The following is an example of setting headers. The names of the headers are specified in string format in the headers_list of the headers section. Multiple headers can be set.

  ...
  "server": {
    "http": {
      "common_config": {
        "headers": ["header1","header2"]
      },
  ...
  "headers": {
    "headers_list": [
      {
        "name": "header1",
        "action": "AppendResponse",
        "field_name": "Content-Type",
        "field_value": "; charset=ISO"
      },
      {
        "name": "header2",
        "action":"AddRequest",
        "field_name":"Accept-Encoding",
        "field_value":"GZIP"
      },
    ]
  }

http/common_config/enable_dos_block

Sets whether to use the DoS attack prevention feature.

Item Description

Data Type

Boolean

Default Value

False

The following is an example of setting enable_dos_block. Set to true to enable the DoS attack prevention feature.

  ...
  "server": {
    "http": {
      "common_config": {
          ...
          "enable_dos_block":true,
          "dos_block_table_size":3097,
          "dos_block_site_count":50,
          "dos_block_site_interval":1,
          "dos_block_period":30
          ...
      },
  ...

http/common_config/dos_block_table_size

Sets the maximum number of IP addresses to be considered as DoS attacks. Any IP addresses exceeding the set value will be blocked.

Item Description

Data Type

Integer

Range

1 ~ INT_MAX

Default Value

3097

Since the table is managed by HTH, if the HTH value is set to greater than 1, the number of IP addresses managed will be 'dos_block_table_size Ă— hth_count'.

The following is an example of setting dos_block_table_size. Incoming IPs are not managed individually but are managed as objects for each IP. For example, if 192.168.0.1 and 192.168.0.2 come in, each IP is managed as a separate object.

  ...
  "server": {
    "http": {
      "common_config": {
          ...
          "enable_dos_block":true,
          "dos_block_table_size":3097,
          "dos_block_site_count":50,
          "dos_block_site_interval":1,
          "dos_block_period":30
          ...
      },
  ...

http/common_config/dos_block_page_count

Specifies the number of requests to the same page.

If a user IP address requests the same page more than the specified number of times within the dos_block_page_interval, the IP address will be blocked during the time specified in the dos_block_period period.

Item Description

Data Type

Integer

Range

1 ~ INT_MAX

Default Value

5

The following describes each configuration value.

Value Description

0

Does not check for DoS attacks on the same page.

The following is an example of setting dos_block_page_count. If more requests than the specified count (5) occur within the interval, the corresponding IP address is blocked. The dos_block_page_count is used in conjunction with dos_block_page_interval.

  ...
  "server": {
    "http": {
      "common_config": {
          ...
          "enable_dos_block":true,
          "dos_block_table_size":1,
          "dos_block_page_count":5,
          "dos_block_page_interval":1,
          "dos_block_period":30,
          ...
      },
  ...

http/common_config/dos_block_page_interval

Specifies the period to check for DoS attacks on the same page.

Item Description

Data Type

Integer

Unit

seconds

Range

1 ~ INT_MAX

Default Value

1

The following is an example of setting dos_block_page_interval. If more requests than the specified count occur within the interval (100 seconds), the corresponding IP address is blocked. The dos_block_page_interval is used in conjunction with dos_block_page_count.

  ...
  "server": {
    "http": {
      "common_config": {
          ...
          "enable_dos_block":true,
          "dos_block_table_size":1,
          "dos_block_page_count":5,
          "dos_block_page_interval":1,
          "dos_block_period":30,
          ...
      },
  ...

http/common_config/dos_block_site_count

Sets the number of requests for the entire site.

If a user’s IP address request any page on the site more than the specified number of times within the dos_block_site_interval, the IP address will be blocked during the time specified in dos_block_period.

Item Description

Data Type

Integer

Range

1 ~ INT_MAX

Default Value

50

The following describes each configuration value.

Value Description

0

Does not check for DoS attacks on site requests.

http/common_config/dos_block_site_interval

Specifies the period to check for DoS attacks on the same site.

Item Description

Data Type

Integer

Unit

seconds

Range

1 ~ INT_MAX

Default Value

1

http/common_config/dos_block_period

Sets the period of time for which specific user IP addresses are blocked.

Item Description

Data Type

Integer

Unit

seconds

Range

1 ~ INT_MAX

Default Value

30

http/common_config/dos_block_white_list

Specifies the IPs to exclude from DoS attack prevention. If a Proxy server is used, specify the server IP.

Item Description

Data Type

Array (string)

Range

Up to 256 items (within 255 characters)

Default Value

30

The following is an example of dos_block settings. In this example, if more requests than the specified count (3) occur for an IP address with table_size (1) during the interval (100 seconds), the IP address will be blocked for the period (100 seconds). However, IP addresses in the white_list are excluded from the DoS blocking management.

  ...
  "server": {
    "http": {
      "common_config": {
          ...
          "enable_dos_block":true,
          "dos_block_table_size":1,
          "dos_block_site_count":3,
          "dos_block_site_interval":100,
          "dos_block_period":100,
          "dos_block_white_list":["192.168.0.1"],
          ...
      },
  ...

http/common_config/url_rewrite_config

Specifies the path to the configuration file for using the URL rewriting feature.

Item Description

Data Type

String

Range

Up to 255 characters

The following is an example of url_rewrite_config settings. It places a configuration file written in regular expressions in the given path.

  ...
  "server": {
    "http": {
      "common_config": {
          ...
          "url_rewrite_config":"/home/tmax/webtob6/config/rewrite9.conf",
          ...
      },
  ...

http/common_config/alias

To change the URI of a specific request to realpath, set the name defined in the ALIAS section.

Item Description

Data Type

Array (string)

Range

Up to 64 items (within 255 characters)

The following is an example of setting an alias. In this case, when url (/external/path/) is called, it will be called as real_path (/home/tmax/webtob6/docs/).

  ...
  "server": {
    "http": {
      "common_config": {
          ...
            "alias": {
              "alias_list":[
                {
                  "name":"alias1",
                  "url":"/external/path/",
                  "real_path":"/home/tmax/webtob6/docs/"
                }
              ]
            }
          ...
      },
  ...

http/common_config/index_name

Specifies the index page name for a service directory request. For example, if the request from client is "/somedir/", the path "/somedir/index.html" is serviced.

Item Description

Data Type

String

Range

Up to 255 characters

Default Value

"index.html"

http/common_config/filters

Sets the filters to be applied when the following events occur during request processing.

AFTER_SEND_REQUEST, AFTER_SEND_RESPONSE, BEFORE_SEND_REQUEST, BEFORE_SEND_RESPONSE, RECEIVE_REQUEST, RECEIVE_RESPONSE
Item Description

Data Type

Array (string)

Range

Up to 15 items (within 255 characters)

http/common_config/rpaf_header

Sets the remote IP that was changed by a proxy server to the IP of the host that sent the request.

Item Description

Data Type

String

Range

Up to 255 characters

Adding rpaf_header allows users to specify a header. If a header set with rpaf_header is contained, a remote IP will be changed to the header IP.

The remote IP address specified can be checked in the access.log.

"rpaf_header" = "X-Forwarded-For"

http/common_config/enable_directory_index

Sets whether to use the Directory Index feature when the index_name file does not exist for a directory request.

Item Description

Data Type

Boolean

Default Value

True

http/http_servers (Required)

Sets the connection information for the servers that handle HTTP requests.

Item Description

Data Type

Array (object)

Range

Up to 100 items

http/http_servers/common_config

A common setting for HTTP servers. If set in the parent item, the settings will be reflected to the child items without the need for additional configuration.

Item Description

Data Type

Object

Priority

The priority of the setting is as follows:

  1. vhosts

  2. http_servers

  3. http

http/http_servers/name (Required)

Specifies the name of the HTTP server.

Item Description

Data Type

String

Range

Up to 31 characters

http/http_servers/port

Specifies the service port of the HTTP server that can be accessed by the user.

Item Description

Data Type

Integer

Range

1 ~ 65535

Default Value

80 or 443 (If SSL is used, the default value is 443.)

http/http_servers/enable_ssl

Specifies whether to use the SSL/TLS protocol to connect to HTTP.

Item Description

Data Type

Boolean

Default Value

False

http/http_servers/ssl_name

Sets the SSL section items to apply. This applies only when enable_ssl is set to true.

Item Description

Data Type

Array (string)

Range

Up to 64 items (within 31 characters)

The following is an example of the ssl_name setting:

  ...
  "server": {
    "http": {
      "http_servers": {
          ...
          "enable_ssl": true,
          "ssl_name": ["ssl1"]
          ...
      },
  ...

http/http_servers/idle_timeout

Specifies the timeout to read/write data to/from a user socket.

When processing a user request, the socket is closed if the user does not write data to or read data from the socket during the specified time.

Item Description

Data Type

Integer

Unit

seconds

Range

1 ~ 3600

Default Value

300

http/http_servers/initial_connection_timeout

Specifies the timeout for receiving the first request from the user.

This setting closes the socket if the user does not send any requests within the specified time after establishing the TCP connection. This also applies to SSL connections. The socket will be closed if the user does not complete SSL connection within the timeout period or fails to send a request after the connection is established.

Item Description

Data Type

Integer

Unit

seconds

Range

0 ~ INT_MAX

Default Value

10

The following describes each configuration value.

Value Description

0

No timeout period is applied.

http/http_servers/request_header_timeout

Specifies the amount of time to wait for the body when an HTTP request body exists.

This configuration is applied when a user is sending an HTTP request. If the user does not send the requested HTTP request body during this time, a '408 Request Timeout' error is sent to the user.

Item Description

Data Type

Integer

Unit

seconds

Range

0 ~ INT_MAX

Default Value

60

The following describes each configuration value.

Value Description

0

No time limit for sending the HTTP request body.

http/http_servers/idle_timeout_status

If an idle timeout occurs, the HTTP status code is returned in the response based on the corresponding setting value.

Item Description

Data Type

Integer

Range

511 ~ 599

Default Value

500

http/http_servers/vhosts

Congirues the virtual host feature that allows the HTTP server to provide different services depending on the requested address.

Item Description

Data Type

Array (object)

Range

Up to 64 items

The following is an example vhosts configuration:

  ...
  "server": {
    "http": {
      "http_servers": {
          ...
          "vhosts":[
            {
              "name":"vhost1",
              "host_name":["www.vh1.com"],
              "common_config":{...}
            },
            {
              "name":"vhost2",
              "host_name":["www.vh2.com"],
              "common_config":{...}
            }
          ],
      }
    }
    ...
  },
  ...

http/http_servers/vhosts/name (Required)

Sets the name of the virtual host.

Item Description

Data Type

String

Range

Up to 64 items

http/http_servers/vhosts/host_name (Required)

Specifies the host name used to access the virtual host. Each host name must be configured differently to distinguish between virtual hosts.

Item Description

Data Type

Array (string)

Range

Up to 10 items (within 127 characters)

http/mime_type_file

Specifies the path for MIME-Type configuration file that maps MIME-Type and file extensions.

This path can be specified as an absolute path or a relative path to $WEBTOB6_HOME_PATH. If no value is set, the feature is disabled.

Item Description

Data Type

String

Range

Up to 255 characters

Default Value

"mime.types"

http/default_mime_type

Specifies the default Content-Type for documents that cannot decide the MIME-Type.

Item Description

Data Type

String

Range

Up to 127 characters

Default Value

"text/html"

The following is an example of setting mime_type:

  ...
  "server": {
    "http": {
      "http_servers": {
          ...
            "mime_type_file":"mime.types",
            "default_mime_type":"text/html"
          ...
      },
  ...

Since ext has a higher priority than mime_type, you need to remove the ext setting to configure mime_type.

wjp

Sets WJP’s connection information for communication with JEUS.

Item Description

Data Type

Object

wjp/port

Sets the service port required for integrating WebtoB with JEUS.

Item Description

Data Type

Integer

Range

1 ~ 65535

Default Value

9900

If WebtoB opens the port, JEUS connects to the port using the following configuration in the 'domain.xml'.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<domain version="8.0" xmlns="http://www.tmaxsoft.com/xml/ns/jeus">
    ...
    <servers>
        <server>
            <web-engine>
                <web-connections>
                    <webtob-connector>
                        <name>webtob1</name>
                        <wjp-version>2</wjp-version>
                        <registration-id>MyGroup</registration-id>
                        <network-address>
                            <port>9900</port>
                        </network-address>
                        <thread-pool>
                            <number>10</number>
                        </thread-pool>
                    </webtob-connector>
                </web-connections>
            </web-engine>
        ...

wjp/enable_ssl

Specifies the option to use the SSL/TLS protocol for service port.

Item Description

Data Type

Boolean

Default Value

False

You can set Truststore generated by WebtoB SSL in JEUS to establish a connection.

wjp/ssl_name

Sets the SSL section items to apply. This applies only when enable_ssl is set to true.

Item Description

Data Type

String

Range

Up to 31 characters

wjp/wjp_servers (Required)

Set the connection information for the servers that will process WJP.

Item Description

Data Type

Array (object)

Range

Up to 100 items

The following is an example of setting wjp_servers:

  ...
  "server": {
    "wjp": {
      "wjp_servers": [
        {
          "name": "JeusServer1",
          "svr_chk_time": 60
        },
        {
          "name": "JeusServer2",
          "svr_chk_time": 30
        }
      ]

  ...

wjp/wjp_servers/name (Required)

Sets the name of the WJP server.

Item Description

Data Type

String

Range

Up to 15 characters

wjp/wjp_servers/svr_chk_time

Specifies the interval at which the connection with JEUS is checked.

For a connection in Ready state without service requests, if there is no response to KeepAlive requests for two consecutive svr_chk_time periods, the connection is recognized as abnormal and is terminated and excluded from service distribution.

Item Description

Data Type

Integer

Unit

seconds

Range

1 ~ 3600

Default Value

60

wjp/wjp_servers/flow_control

Sets the maximum size of the response buffer to control the amount of responses received from the server. A smaller value will cause slower page loading, while larger values results in faster responses.

Item Description

Data Type

Integer

Range

1 ~ INT_MAX

Default Value

50

wjp/wjp_servers/max_jengine_count

Sets the maximum number of JEUS servers that can be connected to one server.

Item Description

Data Type

Integer

Range

1 ~ INT_MAX

Default Value

64

wjp/wjp_servers/ping_timeout_status

Sets the HTTP status code to be returned if a PING request to the JSV server times out.

Item Description

Data Type

Integer

Range

511 ~ 599

Default Value

503

admin

Sets the connection information for the WebtoB Admin server. This setting is used when calling the WebtoB API provided by the Admin server.

Item Description

Data Type

Object

admin/port

Sets the port number of the admin server.

Item Description

Data Type

Integer

Range

1 ~ 65535

Default Value

9090

The port number you set can be checked in the log when running wsadmin.

admin/access_log

Specifies the LOGGING section name corresponding to the access log.

Item Description

Data Type

String

Range

Up to 255 characters

tcp

Sets the TCP connection information. The TCP server acts as a proxy that forwards TCP connections from a specific port or IP address to another server. The TCP server never interprets transferred data.

Item Description

Data Type

Object

tcp/tcp_servers (Required)

Sets connection information for servers to process TCP requests.

Item Description

Data Type

Array(object)

Range

Up to 100 items

tcp/tcp_servers/name (Required)

Sets the name of the TCP server.

Item Description

Data Type

String

Range

Up to 31 characters

tcp/tcp_servers/port (Required)

Specifies the service port of the TCP server that can be accessed by the user.

Item Description

Data Type

Integer

Range

1 ~ 65535

tcp/tcp_servers/server_address (Required)

Specifies the pairs of an IP address and a port number of servers that will process client requests.

Item Description

Data Type

Array (string)

Range

Up to 100 items (within 31 characters)

tcp/tcp_servers/idle_timeout

Specifies the timeout to read/write data to/from a user socket.

When processing a user request, the socket is closed if the user does not write data to or read data from the socket during the specified time.

Item Description

Data Type

Integer

Range

0 ~ INT_MAX

Default Value

300

The following describes each configuration value.

Value Description

0

No time limit for idle state.

tcp/tcp_servers/initial_connection_timeout

Specifies the timeout for receiving the first request from the user.

This setting closes the socket if the user does not send any requests within the specified time after establishing the TCP connection.

Item Description

Data Type

Integer

Range

0 ~ INT_MAX

Default Value

10

The following describes each configuration value.

Value Description

0

No timeout period is applied.

Example

The following is an example of configuring the SERVER section.

"server": {
    "http": {
        "common_config": {
            "doc_root": "docs",
            "idle_timeout": 300,
            "service_order": "uri,ext",
            "access_log": "access_log1",
            "keepalive": true,
            "keepalive_timeout": 60
        },
        "http_servers": [
            {
                "name": "http1",
                "port": 8080,
                "enable_ssl": false
            }
        ]
    }

    "wjp": {
        "port": 9900,
        "wjp_servers": [
            {
                "name": "MyGroup1",
                "svr_chk_time": 60
            }
        ]
    }

    "tcp": {
        "tcp_servers": [
            {
                "name": "tcp1",
                "port": 5000,
                "server_address": [
                    "192.168.1.20:5000"
                ]
            }
        ]
    }
}