Web Server (ws)
Description
Provides access to system APIs via HTTP and WebSocket, and serves the output of static files to system and role-based web applications. To access the API, it performs authorization and works with HTTP sessions by setting and using cookies. For some endpoints, authorization by token using the header `Authorization: Bearer <intergation_point.token_local>`.
Reserved and scaled in mode Active-Active.
When the role is started, the certificate specified in the *certdir* parameter is validated. If the validation fails, the role is started with an unchanged certificate. The certificate can be overridden through the domain settings.
Code |
|
Mode of operation |
|
Backup mode |
|
Types of sites |
|
Layer |
|
Placement |
|
Saving and restoring state on reboot |
|
appendix |
|
Limitations
-
Present in the initial configuration.
-
Is an edge role, uses a TLS certificate for HTTPS and WSS connections.
Parameters
Name | Type | Default | Description | ||
---|---|---|---|---|---|
|
|
required |
Name. May consist of Latin letters and numbers, must begin with a letter. |
||
|
|
required |
Role Type. Possible values: |
||
|
|
required |
The alias of the server network interface on which the roles will interact internally with each other. |
||
|
|
empty |
Additional role options. Contains a json object or list. |
||
|
|
empty |
Role activity flag. When set to false, the role does not participate in validation and is not started. |
||
|
required |
Role ID. |
|||
|
|
An indication that the role has been allocated to a separate node. |
|||
|
empty |
Directory alias on the server for storing files autoprovision. |
|||
|
empty |
The alias of the directory on the server for storing certificates (files 'server.crt' and 'server.key'). This parameter and applies only when the certificate specified in the domain settings is not applied (settings.certificate_pem):
|
|||
|
empty |
Password for decrypting the certificate’s secret key file. |
|||
|
|
A list of HTTP interfaces. Specifies interface aliases servers.
|
|||
|
|
HTTPS interface list. Specifies interface aliases servers.
|
|||
|
|
Local web server port for open TCP connections. |
|||
|
|
The local port of the web server for TLS connections. |
|||
|
|
Mode of operation of the ports.
When redirecting to https, the scheme changes, but the hostname is preserved if accessed by domain name. |
|||
|
empty |
Request service mode
|
|||
|
A list of keys for building different groups of webservers and specifying the lists as access points for microservices product layer. |
||||
|
0 |
Priority number when building lists of webservers and specifying them as access points for microservices product layer. |
|||
|
|
Switch to specifically configure the logging level of web socket connection logging.
|
|||
|
|
Protocol message logging layer websocket.
|
|||
|
empty |
A directory alias on a server with static web server resources. |
Configuration example
The configuration is managed in an application available to master domain administrators. The application hides the full content of the configuration, but it is nevertheless accessible via the API.
The configuration contains a section to describe all instances of all roles. Parameters are defined for each specific role instance.
{
"iface": "eth0",
"name": "ws1",
"roletype": "ws",
"roleid": 11230,
"certdir": "alias://paths/default_certdir",
"keypass": "eb9c4458016d3f1e378d02004c4f4f50",
"httpport": 80,
"httpsport": 443,
"http_ifaces": ["eth0", "eth2"],
"https_ifaces": [],
"ports_mode": "both",
"service_mode": "both",
"websock_debug_level_enabled": 1,
"websock_debug_level": 2
}