Basic Structure
WebtoB environment configuration defines the behavior of a single WebtoB node and the web server.
The configuration file supports .YAML and .JSON formats, as well as .m format used in WebtoB 5. Each setting consists of a 'section name', 'item name', and 'setting value'.
The following is the configuration format in JSON.
"Section Name": {
"Item" : Setting Value,
...,
"Item" : Setting Value
}
The start of each section is followed by the section name and then configuration items.
|
Configuration must be set according to the rules of JSON or YAML format, depending on the chosen format. |
The following is an example of configuration in JSON format.
{
"node": {
"name": "webtob_node",
"hth_count": 1,
"worker_threads": 8
},
"server": {
"http": {
"common_config": {
"doc_root": "docs",
"access_log": "access_log1"
},
"http_servers": [
{
"name": "http1",
"port": [8080],
"enable_ssl": true,
"ssl_name": [
"ssl1"
]
}
]
},
"wjp": {
"port": 9999,
"wjp_servers": [
{
"name": "MyGroup1"
}
]
}
},
"logging": {
"access_log": [
{
"name": "access_log1",
"level": "INFO",
"format": "DEFAULT",
"handlers": {
"file_handler": {
"file_name": "logs/access.log"
}
}
}
],
"error_log": {
"level": "INFO",
"handlers": {
"file_handler": {
"file_name": "logs/errors.log"
}
}
},
"system_log": [
{
"name": "webtob",
"level": "INFO",
"handlers": {
"file_handler": {
"file_name": "logs/webtob.log"
}
}
]
},
"destination": {
"jeus": [
{
"name": "MyGroup1"
}
],
"reverse_proxy": {
"reverse_proxy_group": [
{
"name": "rproxyg1",
"reverse_proxy_server": [
{
"address": "internal.server:80",
"name": "rproxy1"
}
]
}
]},
"htmls": [
{
"name": "htmls1"
}
]
},
"service": {
"uri": [
{
"name": "uri1",
"target_http_servers": [
"http1"
],
"match": {
"type": "prefix",
"target": "/rproxy",
"rewrite": "/"
},
"destination": {
"type": "REVERSE_PROXY",
"target": "rproxyGroup1"
}
}
],
"ext": [
{
"name": "ext1",
"target_http_servers": [
"*"
],
"match": {
"type": "exact",
"target": "text/html"
},
"destination": {
"type": "JEUS",
"target": "MyGroup1"
}
}
]
},
"ssl": {
"ssl_configs": [
{
"name": "ssl1",
"certificate_file": "server.crt",
"certificate_key_file": "key.crt"
}
]
}
}
Types of Configurable Sections
The following describes each section that can be configured in WebtoB.
| Section | Description |
|---|---|
Client access control based on IP address, network/netmask, and header information. |
|
Alias for the physical server path and URI. |
|
The internal server that will actually handle client requests. |
|
Error response actions. |
|
Section for using the Filter module. |
|
Settings for controlling HTTP request and response headers. |
|
Logging format for client requests. |
|
Node settings. |
|
Settings for the information that clients can access. |
|
Settings for internal server to handle HTTP requests based on the request’s URI and EXT. |
|
SSL to use on WebtoB. |
|
The DESTINATION, SERVER, and SERVICE sections are required. |
Setting Value Formats and Configuration
The values of each item are set in one of the following types: object, integer, string, boolean, or array. The following describes each value type.
| Type | Description |
|---|---|
object |
Used when there are multiple child settings.
|
integer |
Numeric values. |
string |
String values. |
boolean |
Sets to either true or false. |
array |
Sets multiple settings of the same type. Enclose with square brackets ([ ]) and separate each setting with a comma (,), or use hyphen (-) after a line break. |
|
To fully understand the configuration items described in this guide, you must first be familiar with the basic rules as follows:
|