srt

The `srt` directive creates a context for defining SRT server blocks in NGINX configuration.

Syntaxsrt { ... }
Defaultnone
Contextmain
Argumentsnone

Description

The srt directive is used to establish a configuration context for SRT (Secure Reliable Transport) in NGINX, allowing the definition of SRT server blocks within it. This directive is crucial when enabling NGINX to handle both SRT to TCP and TCP to SRT communication. When the srt directive is defined, it sets up a structured environment for specifying parameters related to the SRT servers such as listening ports and proxy settings.

Inside the srt block, one or more server directives can be specified, each defining its own handling parameters for the respective SRT connection. These parameters determine how incoming SRT connections will be treated and routed to TCP services and vice versa. The SRT module uses underlying libraries to manage the connections and ensure reliable data transfer, working both for inbound and outbound streams of data.

The srt directive does not accept any parameters and must be placed in the main context of the NGINX configuration. The main SRT context initializes necessary configurations and prepares the server to use SRT connections optimally.

Config Example

srt {
    server {
        listen 4321;
        proxy_pass tcp://127.0.0.1:5678;
    }
}

Ensure that the srt directive is located in the main context; placing it in a wrong context will cause configuration errors.

The srt directive requires the NGINX SRT module to be compiled and included; verify that your NGINX build has the module.

← Back to all directives