annotate xml/en/docs/stream/ngx_stream_core_module.xml @ 2912:7ebe15d6c68d

Updated link to the PROXY protocol specification.
author Yaroslav Zhuravlev <yar@nginx.com>
date Mon, 21 Nov 2022 21:58:20 +0000
parents 44f3b52c0679
children 9eadb98ec770
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1 <?xml version="1.0"?>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3 <!--
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
4 Copyright (C) Nginx, Inc.
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
5 -->
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
6
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
7 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
8
1405
4569719f4247 Split stream module into stream_core and stream_proxy modules.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1394
diff changeset
9 <module name="Module ngx_stream_core_module"
4569719f4247 Split stream module into stream_core and stream_proxy modules.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1394
diff changeset
10 link="/en/docs/stream/ngx_stream_core_module.html"
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
11 lang="en"
2912
7ebe15d6c68d Updated link to the PROXY protocol specification.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2903
diff changeset
12 rev="37">
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
13
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
14 <section id="summary">
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
15
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
16 <para>
1462
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
17 The <literal>ngx_stream_core_module</literal> module
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
18 is available since version 1.9.0.
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
19 This module is not built by default, it should be enabled with the
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
20 <literal>--with-stream</literal>
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
21 configuration parameter.
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
22 </para>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
23
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
24 </section>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
25
1394
66f227952864 Somewhat revamped the stream module documentation.
Ruslan Ermilov <ru@nginx.com>
parents: 1367
diff changeset
26
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
27 <section id="example" name="Example Configuration">
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
28
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
29 <para>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
30 <example>
1405
4569719f4247 Split stream module into stream_core and stream_proxy modules.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1394
diff changeset
31 worker_processes auto;
4569719f4247 Split stream module into stream_core and stream_proxy modules.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1394
diff changeset
32
4569719f4247 Split stream module into stream_core and stream_proxy modules.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1394
diff changeset
33 error_log /var/log/nginx/error.log info;
4569719f4247 Split stream module into stream_core and stream_proxy modules.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1394
diff changeset
34
1528
3ae5301ea37a Added the "events" section to examples of stream and mail.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1507
diff changeset
35 events {
3ae5301ea37a Added the "events" section to examples of stream and mail.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1507
diff changeset
36 worker_connections 1024;
3ae5301ea37a Added the "events" section to examples of stream and mail.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1507
diff changeset
37 }
3ae5301ea37a Added the "events" section to examples of stream and mail.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1507
diff changeset
38
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
39 stream {
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
40 upstream backend {
1405
4569719f4247 Split stream module into stream_core and stream_proxy modules.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1394
diff changeset
41 hash $remote_addr consistent;
4569719f4247 Split stream module into stream_core and stream_proxy modules.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1394
diff changeset
42
4569719f4247 Split stream module into stream_core and stream_proxy modules.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1394
diff changeset
43 server backend1.example.com:12345 weight=5;
4569719f4247 Split stream module into stream_core and stream_proxy modules.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1394
diff changeset
44 server 127.0.0.1:12345 max_fails=3 fail_timeout=30s;
4569719f4247 Split stream module into stream_core and stream_proxy modules.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1394
diff changeset
45 server unix:/tmp/backend3;
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
46 }
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
47
1662
48615cf80e20 Documented the UDP proxy functionality.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1546
diff changeset
48 upstream dns {
48615cf80e20 Documented the UDP proxy functionality.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1546
diff changeset
49 server 192.168.0.1:53535;
48615cf80e20 Documented the UDP proxy functionality.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1546
diff changeset
50 server dns.example.com:53;
48615cf80e20 Documented the UDP proxy functionality.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1546
diff changeset
51 }
48615cf80e20 Documented the UDP proxy functionality.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1546
diff changeset
52
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
53 server {
1405
4569719f4247 Split stream module into stream_core and stream_proxy modules.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1394
diff changeset
54 listen 12345;
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
55 proxy_connect_timeout 1s;
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
56 proxy_timeout 3s;
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
57 proxy_pass backend;
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
58 }
1405
4569719f4247 Split stream module into stream_core and stream_proxy modules.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1394
diff changeset
59
4569719f4247 Split stream module into stream_core and stream_proxy modules.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1394
diff changeset
60 server {
2179
962e1adfa032 Documented UDP streams.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2125
diff changeset
61 listen 127.0.0.1:53 udp reuseport;
1662
48615cf80e20 Documented the UDP proxy functionality.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1546
diff changeset
62 proxy_timeout 20s;
48615cf80e20 Documented the UDP proxy functionality.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1546
diff changeset
63 proxy_pass dns;
48615cf80e20 Documented the UDP proxy functionality.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1546
diff changeset
64 }
48615cf80e20 Documented the UDP proxy functionality.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1546
diff changeset
65
48615cf80e20 Documented the UDP proxy functionality.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1546
diff changeset
66 server {
1405
4569719f4247 Split stream module into stream_core and stream_proxy modules.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1394
diff changeset
67 listen [::1]:12345;
4569719f4247 Split stream module into stream_core and stream_proxy modules.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1394
diff changeset
68 proxy_pass unix:/tmp/stream.socket;
4569719f4247 Split stream module into stream_core and stream_proxy modules.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1394
diff changeset
69 }
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
70 }
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
71 </example>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
72 </para>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
73
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
74 </section>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
75
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
76
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
77 <section id="directives" name="Directives">
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
78
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
79 <directive name="listen">
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
80 <syntax>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
81 <value>address</value>:<value>port</value>
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
82 [<literal>ssl</literal>]
1662
48615cf80e20 Documented the UDP proxy functionality.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1546
diff changeset
83 [<literal>udp</literal>]
1778
1626f1bf164c Documented listen proxy_protocol, $proxy_protocol_addr, $proxy_protocol_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1771
diff changeset
84 [<literal>proxy_protocol</literal>]
2725
6d082b470918 Documented "listen fastopen=" parameter in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2724
diff changeset
85 [<literal>fastopen</literal>=<value>number</value>]
1502
b628e042a15e Documented "listen backlog=" in mail and stream.
Ruslan Ermilov <ru@nginx.com>
parents: 1500
diff changeset
86 [<literal>backlog</literal>=<value>number</value>]
1963
351cefd5ff9c Documented rcvbuf and sndbuf for mail and stream listen directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1911
diff changeset
87 [<literal>rcvbuf</literal>=<value>size</value>]
351cefd5ff9c Documented rcvbuf and sndbuf for mail and stream listen directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1911
diff changeset
88 [<literal>sndbuf</literal>=<value>size</value>]
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
89 [<literal>bind</literal>]
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
90 [<literal>ipv6only</literal>=<literal>on</literal>|<literal>off</literal>]
1493
9faa78768252 Documented the "reuseport" option of the "listen" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1462
diff changeset
91 [<literal>reuseport</literal>]
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
92 [<literal>so_keepalive</literal>=<literal>on</literal>|<literal>off</literal>|[<value>keepidle</value>]:[<value>keepintvl</value>]:[<value>keepcnt</value>]]</syntax>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
93 <default/>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
94 <context>server</context>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
95
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
96 <para>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
97 Sets the <value>address</value> and <value>port</value> for the socket
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
98 on which the server will accept connections.
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
99 It is possible to specify just the port.
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
100 The address can also be a hostname, for example:
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
101 <example>
1405
4569719f4247 Split stream module into stream_core and stream_proxy modules.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1394
diff changeset
102 listen 127.0.0.1:12345;
4569719f4247 Split stream module into stream_core and stream_proxy modules.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1394
diff changeset
103 listen *:12345;
4569719f4247 Split stream module into stream_core and stream_proxy modules.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1394
diff changeset
104 listen 12345; # same as *:12345
4569719f4247 Split stream module into stream_core and stream_proxy modules.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1394
diff changeset
105 listen localhost:12345;
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
106 </example>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
107 IPv6 addresses are specified in square brackets:
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
108 <example>
1405
4569719f4247 Split stream module into stream_core and stream_proxy modules.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1394
diff changeset
109 listen [::1]:12345;
4569719f4247 Split stream module into stream_core and stream_proxy modules.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1394
diff changeset
110 listen [::]:12345;
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
111 </example>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
112 UNIX-domain sockets are specified with the “<literal>unix:</literal>”
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
113 prefix:
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
114 <example>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
115 listen unix:/var/run/nginx.sock;
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
116 </example>
2349
0eabe2f4d365 Documented listen port ranges for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2199
diff changeset
117 </para>
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
118
2349
0eabe2f4d365 Documented listen port ranges for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2199
diff changeset
119 <para id="listen_port_range">
0eabe2f4d365 Documented listen port ranges for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2199
diff changeset
120 Port ranges (1.15.10) are specified with the
0eabe2f4d365 Documented listen port ranges for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2199
diff changeset
121 first and last port separated by a hyphen:
0eabe2f4d365 Documented listen port ranges for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2199
diff changeset
122 <example>
0eabe2f4d365 Documented listen port ranges for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2199
diff changeset
123 listen 127.0.0.1:12345-12399;
0eabe2f4d365 Documented listen port ranges for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2199
diff changeset
124 listen 12345-12399;
0eabe2f4d365 Documented listen port ranges for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2199
diff changeset
125 </example>
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
126 </para>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
127
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
128 <para>
1462
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
129 The <literal>ssl</literal> parameter allows specifying that all
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
130 connections accepted on this port should work in SSL mode.
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
131 </para>
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
132
1686
93063516f6ff Provided the anchor link for the "listen udp" parameter.
Ruslan Ermilov <ru@nginx.com>
parents: 1662
diff changeset
133 <para id="udp">
1662
48615cf80e20 Documented the UDP proxy functionality.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1546
diff changeset
134 The <literal>udp</literal> parameter configures a listening socket
48615cf80e20 Documented the UDP proxy functionality.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1546
diff changeset
135 for working with datagrams (1.9.13).
2358
ee4eccd811cd Added info about reuseport to stream listen udp.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2349
diff changeset
136 In order to handle packets from the same address and port in the same session,
ee4eccd811cd Added info about reuseport to stream listen udp.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2349
diff changeset
137 the <link id="reuseport"><literal>reuseport</literal></link> parameter
ee4eccd811cd Added info about reuseport to stream listen udp.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2349
diff changeset
138 should also be specified.
1662
48615cf80e20 Documented the UDP proxy functionality.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1546
diff changeset
139 </para>
48615cf80e20 Documented the UDP proxy functionality.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1546
diff changeset
140
1778
1626f1bf164c Documented listen proxy_protocol, $proxy_protocol_addr, $proxy_protocol_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1771
diff changeset
141 <para id="proxy_protocol">
1626f1bf164c Documented listen proxy_protocol, $proxy_protocol_addr, $proxy_protocol_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1771
diff changeset
142 The <literal>proxy_protocol</literal> parameter (1.11.4)
1626f1bf164c Documented listen proxy_protocol, $proxy_protocol_addr, $proxy_protocol_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1771
diff changeset
143 allows specifying that all connections accepted on this port should use the
2912
7ebe15d6c68d Updated link to the PROXY protocol specification.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2903
diff changeset
144 <link url="http://www.haproxy.org/download/1.8/doc/proxy-protocol.txt">PROXY
1778
1626f1bf164c Documented listen proxy_protocol, $proxy_protocol_addr, $proxy_protocol_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1771
diff changeset
145 protocol</link>.
2125
b19d5d47c16c Documented ver.2 of the PROXY protocol.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1963
diff changeset
146 <note>
b19d5d47c16c Documented ver.2 of the PROXY protocol.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1963
diff changeset
147 The PROXY protocol version 2 is supported since version 1.13.11.
b19d5d47c16c Documented ver.2 of the PROXY protocol.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1963
diff changeset
148 </note>
1778
1626f1bf164c Documented listen proxy_protocol, $proxy_protocol_addr, $proxy_protocol_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1771
diff changeset
149 </para>
1626f1bf164c Documented listen proxy_protocol, $proxy_protocol_addr, $proxy_protocol_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1771
diff changeset
150
1662
48615cf80e20 Documented the UDP proxy functionality.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1546
diff changeset
151 <para>
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
152 The <literal>listen</literal> directive
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
153 can have several additional parameters specific to socket-related system calls.
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
154 <list type="tag">
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
155
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
156 <tag-name>
2725
6d082b470918 Documented "listen fastopen=" parameter in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2724
diff changeset
157 <literal>fastopen</literal>=<value>number</value>
6d082b470918 Documented "listen fastopen=" parameter in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2724
diff changeset
158 </tag-name>
6d082b470918 Documented "listen fastopen=" parameter in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2724
diff changeset
159 <tag-desc>
6d082b470918 Documented "listen fastopen=" parameter in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2724
diff changeset
160 enables
6d082b470918 Documented "listen fastopen=" parameter in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2724
diff changeset
161 “<link url="http://en.wikipedia.org/wiki/TCP_Fast_Open">TCP Fast Open</link>”
6d082b470918 Documented "listen fastopen=" parameter in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2724
diff changeset
162 for the listening socket (1.21.0) and
2831
4add6ae1296f Updated links to datatracker.ietf.org.
Sergey Kandaurov <pluknet@nginx.com>
parents: 2725
diff changeset
163 <link url="https://datatracker.ietf.org/doc/html/rfc7413#section-5.1">limits</link>
2725
6d082b470918 Documented "listen fastopen=" parameter in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2724
diff changeset
164 the maximum length for the queue of connections that have not yet completed
6d082b470918 Documented "listen fastopen=" parameter in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2724
diff changeset
165 the three-way handshake.
6d082b470918 Documented "listen fastopen=" parameter in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2724
diff changeset
166 <note>
6d082b470918 Documented "listen fastopen=" parameter in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2724
diff changeset
167 Do not enable this feature unless the server can handle
6d082b470918 Documented "listen fastopen=" parameter in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2724
diff changeset
168 receiving the
2831
4add6ae1296f Updated links to datatracker.ietf.org.
Sergey Kandaurov <pluknet@nginx.com>
parents: 2725
diff changeset
169 <link url="https://datatracker.ietf.org/doc/html/rfc7413#section-6.1">
2725
6d082b470918 Documented "listen fastopen=" parameter in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2724
diff changeset
170 same SYN packet with data</link> more than once.
6d082b470918 Documented "listen fastopen=" parameter in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2724
diff changeset
171 </note>
6d082b470918 Documented "listen fastopen=" parameter in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2724
diff changeset
172 </tag-desc>
6d082b470918 Documented "listen fastopen=" parameter in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2724
diff changeset
173
6d082b470918 Documented "listen fastopen=" parameter in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2724
diff changeset
174 <tag-name>
1502
b628e042a15e Documented "listen backlog=" in mail and stream.
Ruslan Ermilov <ru@nginx.com>
parents: 1500
diff changeset
175 <literal>backlog</literal>=<value>number</value>
b628e042a15e Documented "listen backlog=" in mail and stream.
Ruslan Ermilov <ru@nginx.com>
parents: 1500
diff changeset
176 </tag-name>
b628e042a15e Documented "listen backlog=" in mail and stream.
Ruslan Ermilov <ru@nginx.com>
parents: 1500
diff changeset
177 <tag-desc>
b628e042a15e Documented "listen backlog=" in mail and stream.
Ruslan Ermilov <ru@nginx.com>
parents: 1500
diff changeset
178 sets the <literal>backlog</literal> parameter in the
b628e042a15e Documented "listen backlog=" in mail and stream.
Ruslan Ermilov <ru@nginx.com>
parents: 1500
diff changeset
179 <c-func>listen</c-func> call that limits
b628e042a15e Documented "listen backlog=" in mail and stream.
Ruslan Ermilov <ru@nginx.com>
parents: 1500
diff changeset
180 the maximum length for the queue of pending connections (1.9.2).
b628e042a15e Documented "listen backlog=" in mail and stream.
Ruslan Ermilov <ru@nginx.com>
parents: 1500
diff changeset
181 By default,
1911
f024ac0ec5c7 Apple rebranded Mac OS X to macOS.
Sergey Kandaurov <pluknet@nginx.com>
parents: 1798
diff changeset
182 <literal>backlog</literal> is set to -1 on FreeBSD, DragonFly BSD, and macOS,
1502
b628e042a15e Documented "listen backlog=" in mail and stream.
Ruslan Ermilov <ru@nginx.com>
parents: 1500
diff changeset
183 and to 511 on other platforms.
b628e042a15e Documented "listen backlog=" in mail and stream.
Ruslan Ermilov <ru@nginx.com>
parents: 1500
diff changeset
184 </tag-desc>
b628e042a15e Documented "listen backlog=" in mail and stream.
Ruslan Ermilov <ru@nginx.com>
parents: 1500
diff changeset
185
b628e042a15e Documented "listen backlog=" in mail and stream.
Ruslan Ermilov <ru@nginx.com>
parents: 1500
diff changeset
186 <tag-name>
1963
351cefd5ff9c Documented rcvbuf and sndbuf for mail and stream listen directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1911
diff changeset
187 <literal>rcvbuf</literal>=<value>size</value>
351cefd5ff9c Documented rcvbuf and sndbuf for mail and stream listen directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1911
diff changeset
188 </tag-name>
351cefd5ff9c Documented rcvbuf and sndbuf for mail and stream listen directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1911
diff changeset
189 <tag-desc>
351cefd5ff9c Documented rcvbuf and sndbuf for mail and stream listen directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1911
diff changeset
190 sets the receive buffer size
351cefd5ff9c Documented rcvbuf and sndbuf for mail and stream listen directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1911
diff changeset
191 (the <c-def>SO_RCVBUF</c-def> option) for the listening socket (1.11.13).
351cefd5ff9c Documented rcvbuf and sndbuf for mail and stream listen directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1911
diff changeset
192 </tag-desc>
351cefd5ff9c Documented rcvbuf and sndbuf for mail and stream listen directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1911
diff changeset
193
351cefd5ff9c Documented rcvbuf and sndbuf for mail and stream listen directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1911
diff changeset
194 <tag-name>
351cefd5ff9c Documented rcvbuf and sndbuf for mail and stream listen directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1911
diff changeset
195 <literal>sndbuf</literal>=<value>size</value>
351cefd5ff9c Documented rcvbuf and sndbuf for mail and stream listen directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1911
diff changeset
196 </tag-name>
351cefd5ff9c Documented rcvbuf and sndbuf for mail and stream listen directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1911
diff changeset
197 <tag-desc>
351cefd5ff9c Documented rcvbuf and sndbuf for mail and stream listen directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1911
diff changeset
198 sets the send buffer size
351cefd5ff9c Documented rcvbuf and sndbuf for mail and stream listen directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1911
diff changeset
199 (the <c-def>SO_SNDBUF</c-def> option) for the listening socket (1.11.13).
351cefd5ff9c Documented rcvbuf and sndbuf for mail and stream listen directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1911
diff changeset
200 </tag-desc>
351cefd5ff9c Documented rcvbuf and sndbuf for mail and stream listen directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1911
diff changeset
201
351cefd5ff9c Documented rcvbuf and sndbuf for mail and stream listen directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1911
diff changeset
202 <tag-name>
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
203 <literal>bind</literal>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
204 </tag-name>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
205 <tag-desc>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
206 this parameter instructs to make a separate <c-func>bind</c-func>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
207 call for a given address:port pair.
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
208 The fact is that if there are several <literal>listen</literal> directives with
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
209 the same port but different addresses, and one of the
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
210 <literal>listen</literal> directives listens on all addresses
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
211 for the given port (<literal>*:</literal><value>port</value>), nginx will
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
212 <c-func>bind</c-func> only to <literal>*:</literal><value>port</value>.
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
213 It should be noted that the <c-func>getsockname</c-func> system call will be
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
214 made in this case to determine the address that accepted the connection.
2724
00afc7c4d4df Documented listen options that imply "bind".
Ruslan Ermilov <ru@nginx.com>
parents: 2471
diff changeset
215 If the <literal>backlog</literal>,
00afc7c4d4df Documented listen options that imply "bind".
Ruslan Ermilov <ru@nginx.com>
parents: 2471
diff changeset
216 <literal>rcvbuf</literal>, <literal>sndbuf</literal>,
00afc7c4d4df Documented listen options that imply "bind".
Ruslan Ermilov <ru@nginx.com>
parents: 2471
diff changeset
217 <literal>ipv6only</literal>, <literal>reuseport</literal>,
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
218 or <literal>so_keepalive</literal> parameters
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
219 are used then for a given
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
220 <value>address</value>:<value>port</value> pair
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
221 a separate <c-func>bind</c-func> call will always be made.
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
222 </tag-desc>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
223
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
224 <tag-name>
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
225 <literal>ipv6only</literal>=<literal>on</literal>|<literal>off</literal>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
226 </tag-name>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
227 <tag-desc>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
228 this parameter determines
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
229 (via the <c-def>IPV6_V6ONLY</c-def> socket option)
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
230 whether an IPv6 socket listening on a wildcard address <literal>[::]</literal>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
231 will accept only IPv6 connections or both IPv6 and IPv4 connections.
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
232 This parameter is turned on by default.
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
233 It can only be set once on start.
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
234 </tag-desc>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
235
1507
14180fa9a518 Added ids for reuseport, mentioned reuseport in news.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1502
diff changeset
236 <tag-name id="reuseport">
1493
9faa78768252 Documented the "reuseport" option of the "listen" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1462
diff changeset
237 <literal>reuseport</literal>
9faa78768252 Documented the "reuseport" option of the "listen" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1462
diff changeset
238 </tag-name>
9faa78768252 Documented the "reuseport" option of the "listen" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1462
diff changeset
239 <tag-desc>
9faa78768252 Documented the "reuseport" option of the "listen" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1462
diff changeset
240 this parameter (1.9.1) instructs to create an individual listening socket
9faa78768252 Documented the "reuseport" option of the "listen" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1462
diff changeset
241 for each worker process
2199
1d60e4b4ed64 Documented SO_REUSEPORT_LB for listen reuseport.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2179
diff changeset
242 (using the
1d60e4b4ed64 Documented SO_REUSEPORT_LB for listen reuseport.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2179
diff changeset
243 <c-def>SO_REUSEPORT</c-def> socket option on Linux 3.9+ and DragonFly BSD,
1d60e4b4ed64 Documented SO_REUSEPORT_LB for listen reuseport.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2179
diff changeset
244 or <c-def>SO_REUSEPORT_LB</c-def> on FreeBSD 12+), allowing a kernel
1496
99ce48c8cce3 Corrected the "reuseport" description of the "listen" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1493
diff changeset
245 to distribute incoming connections between worker processes.
2199
1d60e4b4ed64 Documented SO_REUSEPORT_LB for listen reuseport.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2179
diff changeset
246 This currently works only on Linux 3.9+, DragonFly BSD,
1d60e4b4ed64 Documented SO_REUSEPORT_LB for listen reuseport.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2179
diff changeset
247 and FreeBSD 12+ (1.15.1).
1493
9faa78768252 Documented the "reuseport" option of the "listen" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1462
diff changeset
248 <note>
9faa78768252 Documented the "reuseport" option of the "listen" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1462
diff changeset
249 Inappropriate use of this option may have its security
9faa78768252 Documented the "reuseport" option of the "listen" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1462
diff changeset
250 <link url="http://man7.org/linux/man-pages/man7/socket.7.html">implications</link>.
9faa78768252 Documented the "reuseport" option of the "listen" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1462
diff changeset
251 </note>
9faa78768252 Documented the "reuseport" option of the "listen" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1462
diff changeset
252 </tag-desc>
9faa78768252 Documented the "reuseport" option of the "listen" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1462
diff changeset
253
9faa78768252 Documented the "reuseport" option of the "listen" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1462
diff changeset
254 <tag-name>
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
255 <literal>so_keepalive</literal>=<literal>on</literal>|<literal>off</literal>|[<value>keepidle</value>]:[<value>keepintvl</value>]:[<value>keepcnt</value>]
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
256 </tag-name>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
257 <tag-desc>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
258 this parameter configures the “TCP keepalive” behavior
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
259 for the listening socket.
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
260 If this parameter is omitted then the operating system’s settings will be
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
261 in effect for the socket.
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
262 If it is set to the value “<literal>on</literal>”, the
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
263 <c-def>SO_KEEPALIVE</c-def> option is turned on for the socket.
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
264 If it is set to the value “<literal>off</literal>”, the
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
265 <c-def>SO_KEEPALIVE</c-def> option is turned off for the socket.
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
266 Some operating systems support setting of TCP keepalive parameters on
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
267 a per-socket basis using the <c-def>TCP_KEEPIDLE</c-def>,
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
268 <c-def>TCP_KEEPINTVL</c-def>, and <c-def>TCP_KEEPCNT</c-def> socket options.
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
269 On such systems (currently, Linux 2.4+, NetBSD 5+, and
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
270 FreeBSD 9.0-STABLE), they can be configured
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
271 using the <value>keepidle</value>, <value>keepintvl</value>, and
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
272 <value>keepcnt</value> parameters.
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
273 One or two parameters may be omitted, in which case the system default setting
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
274 for the corresponding socket option will be in effect.
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
275 For example,
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
276 <example>so_keepalive=30m::10</example>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
277 will set the idle timeout (<c-def>TCP_KEEPIDLE</c-def>) to 30 minutes,
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
278 leave the probe interval (<c-def>TCP_KEEPINTVL</c-def>) at its system default,
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
279 and set the probes count (<c-def>TCP_KEEPCNT</c-def>) to 10 probes.
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
280 </tag-desc>
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
281
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
282 </list>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
283 </para>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
284
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
285 <para>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
286 Different servers must listen on different
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
287 <value>address</value>:<value>port</value> pairs.
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
288 </para>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
289
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
290 </directive>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
291
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
292
1798
59d1f512c3a0 Documented the ngx_stream_ssl_preread_module module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1782
diff changeset
293 <directive name="preread_buffer_size">
59d1f512c3a0 Documented the ngx_stream_ssl_preread_module module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1782
diff changeset
294 <syntax><value>size</value></syntax>
59d1f512c3a0 Documented the ngx_stream_ssl_preread_module module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1782
diff changeset
295 <default>16k</default>
59d1f512c3a0 Documented the ngx_stream_ssl_preread_module module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1782
diff changeset
296 <context>stream</context>
59d1f512c3a0 Documented the ngx_stream_ssl_preread_module module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1782
diff changeset
297 <context>server</context>
59d1f512c3a0 Documented the ngx_stream_ssl_preread_module module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1782
diff changeset
298 <appeared-in>1.11.5</appeared-in>
59d1f512c3a0 Documented the ngx_stream_ssl_preread_module module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1782
diff changeset
299
59d1f512c3a0 Documented the ngx_stream_ssl_preread_module module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1782
diff changeset
300 <para>
59d1f512c3a0 Documented the ngx_stream_ssl_preread_module module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1782
diff changeset
301 Specifies a <value>size</value> of the
59d1f512c3a0 Documented the ngx_stream_ssl_preread_module module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1782
diff changeset
302 <link doc="stream_processing.xml" id="preread_phase">preread</link> buffer.
59d1f512c3a0 Documented the ngx_stream_ssl_preread_module module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1782
diff changeset
303 </para>
59d1f512c3a0 Documented the ngx_stream_ssl_preread_module module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1782
diff changeset
304
59d1f512c3a0 Documented the ngx_stream_ssl_preread_module module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1782
diff changeset
305 </directive>
59d1f512c3a0 Documented the ngx_stream_ssl_preread_module module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1782
diff changeset
306
59d1f512c3a0 Documented the ngx_stream_ssl_preread_module module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1782
diff changeset
307
59d1f512c3a0 Documented the ngx_stream_ssl_preread_module module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1782
diff changeset
308 <directive name="preread_timeout">
59d1f512c3a0 Documented the ngx_stream_ssl_preread_module module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1782
diff changeset
309 <syntax><value>timeout</value></syntax>
59d1f512c3a0 Documented the ngx_stream_ssl_preread_module module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1782
diff changeset
310 <default>30s</default>
59d1f512c3a0 Documented the ngx_stream_ssl_preread_module module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1782
diff changeset
311 <context>stream</context>
59d1f512c3a0 Documented the ngx_stream_ssl_preread_module module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1782
diff changeset
312 <context>server</context>
59d1f512c3a0 Documented the ngx_stream_ssl_preread_module module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1782
diff changeset
313 <appeared-in>1.11.5</appeared-in>
59d1f512c3a0 Documented the ngx_stream_ssl_preread_module module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1782
diff changeset
314
59d1f512c3a0 Documented the ngx_stream_ssl_preread_module module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1782
diff changeset
315 <para>
59d1f512c3a0 Documented the ngx_stream_ssl_preread_module module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1782
diff changeset
316 Specifies a <value>timeout</value> of the
59d1f512c3a0 Documented the ngx_stream_ssl_preread_module module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1782
diff changeset
317 <link doc="stream_processing.xml" id="preread_phase">preread</link> phase.
59d1f512c3a0 Documented the ngx_stream_ssl_preread_module module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1782
diff changeset
318 </para>
59d1f512c3a0 Documented the ngx_stream_ssl_preread_module module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1782
diff changeset
319
59d1f512c3a0 Documented the ngx_stream_ssl_preread_module module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1782
diff changeset
320 </directive>
59d1f512c3a0 Documented the ngx_stream_ssl_preread_module module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1782
diff changeset
321
59d1f512c3a0 Documented the ngx_stream_ssl_preread_module module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1782
diff changeset
322
1782
363249d888e1 Documented the "proxy_protocol_timeout" directive in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1780
diff changeset
323 <directive name="proxy_protocol_timeout">
363249d888e1 Documented the "proxy_protocol_timeout" directive in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1780
diff changeset
324 <syntax><value>timeout</value></syntax>
363249d888e1 Documented the "proxy_protocol_timeout" directive in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1780
diff changeset
325 <default>30s</default>
363249d888e1 Documented the "proxy_protocol_timeout" directive in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1780
diff changeset
326 <context>stream</context>
363249d888e1 Documented the "proxy_protocol_timeout" directive in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1780
diff changeset
327 <context>server</context>
363249d888e1 Documented the "proxy_protocol_timeout" directive in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1780
diff changeset
328 <appeared-in>1.11.4</appeared-in>
363249d888e1 Documented the "proxy_protocol_timeout" directive in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1780
diff changeset
329
363249d888e1 Documented the "proxy_protocol_timeout" directive in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1780
diff changeset
330 <para>
363249d888e1 Documented the "proxy_protocol_timeout" directive in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1780
diff changeset
331 Specifies a <value>timeout</value> for
363249d888e1 Documented the "proxy_protocol_timeout" directive in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1780
diff changeset
332 reading the PROXY protocol header to complete.
363249d888e1 Documented the "proxy_protocol_timeout" directive in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1780
diff changeset
333 If no entire header is transmitted within this time,
363249d888e1 Documented the "proxy_protocol_timeout" directive in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1780
diff changeset
334 the connection is closed.
363249d888e1 Documented the "proxy_protocol_timeout" directive in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1780
diff changeset
335 </para>
363249d888e1 Documented the "proxy_protocol_timeout" directive in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1780
diff changeset
336
363249d888e1 Documented the "proxy_protocol_timeout" directive in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1780
diff changeset
337 </directive>
363249d888e1 Documented the "proxy_protocol_timeout" directive in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1780
diff changeset
338
363249d888e1 Documented the "proxy_protocol_timeout" directive in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1780
diff changeset
339
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
340 <directive name="resolver">
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
341 <syntax>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
342 <value>address</value> ...
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
343 [<literal>valid</literal>=<value>time</value>]
2870
e06cf66a9f63 Documented the "ipv4=off" parameter of the "resolver" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2831
diff changeset
344 [<literal>ipv4</literal>=<literal>on</literal>|<literal>off</literal>]
2451
721f78cff4ef Documented resolver statistics for stream and mail.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2358
diff changeset
345 [<literal>ipv6</literal>=<literal>on</literal>|<literal>off</literal>]
721f78cff4ef Documented resolver statistics for stream and mail.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2358
diff changeset
346 [<literal>status_zone</literal>=<value>zone</value>]</syntax>
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
347 <default/>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
348 <context>stream</context>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
349 <context>server</context>
1753
256774f145ac Documented stream resolver and resolver_timeout for opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1742
diff changeset
350 <appeared-in>1.11.3</appeared-in>
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
351
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
352 <para>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
353 Configures name servers used to resolve names of upstream servers
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
354 into addresses, for example:
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
355 <example>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
356 resolver 127.0.0.1 [::1]:5353;
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
357 </example>
2452
4487310de7e7 Added IDs to resolver parameters, minor language fixes in resolver.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2451
diff changeset
358 The address can be specified as a domain name or IP address,
4487310de7e7 Added IDs to resolver parameters, minor language fixes in resolver.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2451
diff changeset
359 with an optional port.
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
360 If port is not specified, the port 53 is used.
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
361 Name servers are queried in a round-robin fashion.
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
362 </para>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
363
2452
4487310de7e7 Added IDs to resolver parameters, minor language fixes in resolver.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2451
diff changeset
364 <para id="resolver_ipv6">
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
365 By default, nginx will look up both IPv4 and IPv6 addresses while resolving.
2870
e06cf66a9f63 Documented the "ipv4=off" parameter of the "resolver" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2831
diff changeset
366 If looking up of IPv4 or IPv6 addresses is not desired,
e06cf66a9f63 Documented the "ipv4=off" parameter of the "resolver" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2831
diff changeset
367 the <literal>ipv4=off</literal> (1.23.1) or
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
368 the <literal>ipv6=off</literal> parameter can be specified.
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
369 </para>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
370
2452
4487310de7e7 Added IDs to resolver parameters, minor language fixes in resolver.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2451
diff changeset
371 <para id="resolver_valid">
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
372 By default, nginx caches answers using the TTL value of a response.
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
373 The optional <literal>valid</literal> parameter allows overriding it:
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
374 <example>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
375 resolver 127.0.0.1 [::1]:5353 valid=30s;
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
376 </example>
2471
c8f0f30e1513 Added a note about DNS spoofing to all "resolver" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 2458
diff changeset
377 <note>
c8f0f30e1513 Added a note about DNS spoofing to all "resolver" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 2458
diff changeset
378 To prevent DNS spoofing, it is recommended
c8f0f30e1513 Added a note about DNS spoofing to all "resolver" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 2458
diff changeset
379 configuring DNS servers in a properly secured trusted local network.
c8f0f30e1513 Added a note about DNS spoofing to all "resolver" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 2458
diff changeset
380 </note>
2451
721f78cff4ef Documented resolver statistics for stream and mail.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2358
diff changeset
381 </para>
721f78cff4ef Documented resolver statistics for stream and mail.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2358
diff changeset
382
721f78cff4ef Documented resolver statistics for stream and mail.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2358
diff changeset
383 <para id="resolver_status_zone">
721f78cff4ef Documented resolver statistics for stream and mail.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2358
diff changeset
384 The optional <literal>status_zone</literal> parameter (1.17.1)
721f78cff4ef Documented resolver statistics for stream and mail.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2358
diff changeset
385 enables
721f78cff4ef Documented resolver statistics for stream and mail.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2358
diff changeset
386 <link doc="../http/ngx_http_api_module.xml" id="resolvers_">collection</link>
721f78cff4ef Documented resolver statistics for stream and mail.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2358
diff changeset
387 of DNS server statistics of requests and responses
721f78cff4ef Documented resolver statistics for stream and mail.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2358
diff changeset
388 in the specified <value>zone</value>.
721f78cff4ef Documented resolver statistics for stream and mail.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2358
diff changeset
389 The parameter is available as part of our
721f78cff4ef Documented resolver statistics for stream and mail.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2358
diff changeset
390 <commercial_version>commercial subscription</commercial_version>.
721f78cff4ef Documented resolver statistics for stream and mail.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2358
diff changeset
391 </para>
721f78cff4ef Documented resolver statistics for stream and mail.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2358
diff changeset
392
721f78cff4ef Documented resolver statistics for stream and mail.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2358
diff changeset
393 <para>
1462
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
394 <note>
1753
256774f145ac Documented stream resolver and resolver_timeout for opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1742
diff changeset
395 Before version 1.11.3, this directive was available as part of our
1462
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
396 <commercial_version>commercial subscription</commercial_version>.
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
397 </note>
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
398 </para>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
399
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
400 </directive>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
401
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
402
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
403 <directive name="resolver_timeout">
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
404 <syntax><value>time</value></syntax>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
405 <default>30s</default>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
406 <context>stream</context>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
407 <context>server</context>
1753
256774f145ac Documented stream resolver and resolver_timeout for opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1742
diff changeset
408 <appeared-in>1.11.3</appeared-in>
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
409
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
410 <para>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
411 Sets a timeout for name resolution, for example:
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
412 <example>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
413 resolver_timeout 5s;
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
414 </example>
1462
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
415 <note>
1753
256774f145ac Documented stream resolver and resolver_timeout for opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1742
diff changeset
416 Before version 1.11.3, this directive was available as part of our
1462
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
417 <commercial_version>commercial subscription</commercial_version>.
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
418 </note>
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
419 </para>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
420
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
421 </directive>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
422
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1405
diff changeset
423
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
424 <directive name="server">
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
425 <syntax block="yes"/>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
426 <default/>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
427 <context>stream</context>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
428
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
429 <para>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
430 Sets the configuration for a server.
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
431 </para>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
432
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
433 </directive>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
434
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
435
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
436 <directive name="stream">
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
437 <syntax block="yes"/>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
438 <default/>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
439 <context>main</context>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
440
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
441 <para>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
442 Provides the configuration file context in which the stream server directives
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
443 are specified.
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
444 </para>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
445
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
446 </directive>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
447
1546
8ea1813272bb Documented the tcp_nodelay directive for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1528
diff changeset
448
8ea1813272bb Documented the tcp_nodelay directive for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1528
diff changeset
449 <directive name="tcp_nodelay">
8ea1813272bb Documented the tcp_nodelay directive for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1528
diff changeset
450 <syntax><literal>on</literal> | <literal>off</literal></syntax>
8ea1813272bb Documented the tcp_nodelay directive for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1528
diff changeset
451 <default>on</default>
8ea1813272bb Documented the tcp_nodelay directive for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1528
diff changeset
452 <context>stream</context>
8ea1813272bb Documented the tcp_nodelay directive for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1528
diff changeset
453 <context>server</context>
8ea1813272bb Documented the tcp_nodelay directive for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1528
diff changeset
454 <appeared-in>1.9.4</appeared-in>
8ea1813272bb Documented the tcp_nodelay directive for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1528
diff changeset
455
8ea1813272bb Documented the tcp_nodelay directive for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1528
diff changeset
456 <para>
8ea1813272bb Documented the tcp_nodelay directive for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1528
diff changeset
457 Enables or disables the use of the <c-def>TCP_NODELAY</c-def> option.
8ea1813272bb Documented the tcp_nodelay directive for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1528
diff changeset
458 The option is enabled for both client and proxied server connections.
8ea1813272bb Documented the tcp_nodelay directive for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1528
diff changeset
459 </para>
8ea1813272bb Documented the tcp_nodelay directive for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1528
diff changeset
460
8ea1813272bb Documented the tcp_nodelay directive for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1528
diff changeset
461 </directive>
8ea1813272bb Documented the tcp_nodelay directive for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1528
diff changeset
462
1741
a99ebc3af3e4 Added variables_hash_bucket_size and variables_max_size in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1686
diff changeset
463
a99ebc3af3e4 Added variables_hash_bucket_size and variables_max_size in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1686
diff changeset
464 <directive name="variables_hash_bucket_size">
a99ebc3af3e4 Added variables_hash_bucket_size and variables_max_size in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1686
diff changeset
465 <syntax><value>size</value></syntax>
a99ebc3af3e4 Added variables_hash_bucket_size and variables_max_size in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1686
diff changeset
466 <default>64</default>
a99ebc3af3e4 Added variables_hash_bucket_size and variables_max_size in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1686
diff changeset
467 <context>stream</context>
a99ebc3af3e4 Added variables_hash_bucket_size and variables_max_size in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1686
diff changeset
468 <appeared-in>1.11.2</appeared-in>
a99ebc3af3e4 Added variables_hash_bucket_size and variables_max_size in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1686
diff changeset
469
a99ebc3af3e4 Added variables_hash_bucket_size and variables_max_size in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1686
diff changeset
470 <para>
a99ebc3af3e4 Added variables_hash_bucket_size and variables_max_size in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1686
diff changeset
471 Sets the bucket size for the variables hash table.
a99ebc3af3e4 Added variables_hash_bucket_size and variables_max_size in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1686
diff changeset
472 The details of setting up hash tables are provided in a separate
a99ebc3af3e4 Added variables_hash_bucket_size and variables_max_size in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1686
diff changeset
473 <link doc="../hash.xml">document</link>.
a99ebc3af3e4 Added variables_hash_bucket_size and variables_max_size in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1686
diff changeset
474 </para>
a99ebc3af3e4 Added variables_hash_bucket_size and variables_max_size in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1686
diff changeset
475
a99ebc3af3e4 Added variables_hash_bucket_size and variables_max_size in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1686
diff changeset
476 </directive>
a99ebc3af3e4 Added variables_hash_bucket_size and variables_max_size in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1686
diff changeset
477
a99ebc3af3e4 Added variables_hash_bucket_size and variables_max_size in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1686
diff changeset
478
a99ebc3af3e4 Added variables_hash_bucket_size and variables_max_size in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1686
diff changeset
479 <directive name="variables_hash_max_size">
a99ebc3af3e4 Added variables_hash_bucket_size and variables_max_size in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1686
diff changeset
480 <syntax><value>size</value></syntax>
a99ebc3af3e4 Added variables_hash_bucket_size and variables_max_size in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1686
diff changeset
481 <default>1024</default>
a99ebc3af3e4 Added variables_hash_bucket_size and variables_max_size in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1686
diff changeset
482 <context>stream</context>
a99ebc3af3e4 Added variables_hash_bucket_size and variables_max_size in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1686
diff changeset
483 <appeared-in>1.11.2</appeared-in>
a99ebc3af3e4 Added variables_hash_bucket_size and variables_max_size in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1686
diff changeset
484
a99ebc3af3e4 Added variables_hash_bucket_size and variables_max_size in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1686
diff changeset
485 <para>
a99ebc3af3e4 Added variables_hash_bucket_size and variables_max_size in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1686
diff changeset
486 Sets the maximum <value>size</value> of the variables hash table.
a99ebc3af3e4 Added variables_hash_bucket_size and variables_max_size in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1686
diff changeset
487 The details of setting up hash tables are provided in a separate
a99ebc3af3e4 Added variables_hash_bucket_size and variables_max_size in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1686
diff changeset
488 <link doc="../hash.xml">document</link>.
a99ebc3af3e4 Added variables_hash_bucket_size and variables_max_size in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1686
diff changeset
489 </para>
a99ebc3af3e4 Added variables_hash_bucket_size and variables_max_size in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1686
diff changeset
490
a99ebc3af3e4 Added variables_hash_bucket_size and variables_max_size in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1686
diff changeset
491 </directive>
a99ebc3af3e4 Added variables_hash_bucket_size and variables_max_size in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1686
diff changeset
492
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
493 </section>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
494
1742
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
495
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
496 <section id="variables" name="Embedded Variables">
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
497
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
498 <para>
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
499 The <literal>ngx_stream_core_module</literal> module supports variables
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
500 since 1.11.2.
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
501 <list type="tag">
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
502
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
503 <tag-name id="var_binary_remote_addr"><var>$binary_remote_addr</var></tag-name>
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
504 <tag-desc>
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
505 client address in a binary form, value’s length is always 4 bytes
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
506 for IPv4 addresses or 16 bytes for IPv6 addresses
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
507 </tag-desc>
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
508
1768
061b590cbe1a Documented $bytes_received, $session_time, $protocol in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1753
diff changeset
509 <tag-name id="var_bytes_received"><var>$bytes_received</var></tag-name>
061b590cbe1a Documented $bytes_received, $session_time, $protocol in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1753
diff changeset
510 <tag-desc>
061b590cbe1a Documented $bytes_received, $session_time, $protocol in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1753
diff changeset
511 number of bytes received from a client (1.11.4)
061b590cbe1a Documented $bytes_received, $session_time, $protocol in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1753
diff changeset
512 </tag-desc>
061b590cbe1a Documented $bytes_received, $session_time, $protocol in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1753
diff changeset
513
1742
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
514 <tag-name id="var_bytes_sent"><var>$bytes_sent</var></tag-name>
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
515 <tag-desc>
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
516 number of bytes sent to a client
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
517 </tag-desc>
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
518
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
519 <tag-name id="var_connection"><var>$connection</var></tag-name>
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
520 <tag-desc>
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
521 connection serial number
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
522 </tag-desc>
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
523
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
524 <tag-name id="var_hostname"><var>$hostname</var></tag-name>
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
525 <tag-desc>
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
526 host name
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
527 </tag-desc>
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
528
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
529 <tag-name id="var_msec"><var>$msec</var></tag-name>
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
530 <tag-desc>
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
531 current time in seconds with the milliseconds resolution
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
532 </tag-desc>
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
533
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
534 <tag-name id="var_nginx_version"><var>$nginx_version</var></tag-name>
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
535 <tag-desc>
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
536 nginx version
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
537 </tag-desc>
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
538
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
539 <tag-name id="var_pid"><var>$pid</var></tag-name>
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
540 <tag-desc>
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
541 PID of the worker process
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
542 </tag-desc>
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
543
1768
061b590cbe1a Documented $bytes_received, $session_time, $protocol in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1753
diff changeset
544 <tag-name id="var_protocol"><var>$protocol</var></tag-name>
061b590cbe1a Documented $bytes_received, $session_time, $protocol in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1753
diff changeset
545 <tag-desc>
061b590cbe1a Documented $bytes_received, $session_time, $protocol in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1753
diff changeset
546 protocol used to communicate with the client:
061b590cbe1a Documented $bytes_received, $session_time, $protocol in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1753
diff changeset
547 <literal>TCP</literal> or <literal>UDP</literal> (1.11.4)
061b590cbe1a Documented $bytes_received, $session_time, $protocol in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1753
diff changeset
548 </tag-desc>
061b590cbe1a Documented $bytes_received, $session_time, $protocol in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1753
diff changeset
549
1778
1626f1bf164c Documented listen proxy_protocol, $proxy_protocol_addr, $proxy_protocol_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1771
diff changeset
550 <tag-name id="var_proxy_protocol_addr"><var>$proxy_protocol_addr</var></tag-name>
1626f1bf164c Documented listen proxy_protocol, $proxy_protocol_addr, $proxy_protocol_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1771
diff changeset
551 <tag-desc>
2457
3896055c397e Fixed descriptions of $proxy_protocol_addr and $proxy_protocol_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2452
diff changeset
552 client address from the PROXY protocol header (1.11.4)
1778
1626f1bf164c Documented listen proxy_protocol, $proxy_protocol_addr, $proxy_protocol_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1771
diff changeset
553 <para>
1626f1bf164c Documented listen proxy_protocol, $proxy_protocol_addr, $proxy_protocol_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1771
diff changeset
554 The PROXY protocol must be previously enabled by setting the
1626f1bf164c Documented listen proxy_protocol, $proxy_protocol_addr, $proxy_protocol_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1771
diff changeset
555 <literal>proxy_protocol</literal> parameter
1626f1bf164c Documented listen proxy_protocol, $proxy_protocol_addr, $proxy_protocol_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1771
diff changeset
556 in the <link id="listen"/> directive.
1626f1bf164c Documented listen proxy_protocol, $proxy_protocol_addr, $proxy_protocol_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1771
diff changeset
557 </para>
1626f1bf164c Documented listen proxy_protocol, $proxy_protocol_addr, $proxy_protocol_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1771
diff changeset
558 </tag-desc>
1626f1bf164c Documented listen proxy_protocol, $proxy_protocol_addr, $proxy_protocol_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1771
diff changeset
559
1626f1bf164c Documented listen proxy_protocol, $proxy_protocol_addr, $proxy_protocol_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1771
diff changeset
560 <tag-name id="var_proxy_protocol_port"><var>$proxy_protocol_port</var></tag-name>
1626f1bf164c Documented listen proxy_protocol, $proxy_protocol_addr, $proxy_protocol_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1771
diff changeset
561 <tag-desc>
2457
3896055c397e Fixed descriptions of $proxy_protocol_addr and $proxy_protocol_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2452
diff changeset
562 client port from the PROXY protocol header (1.11.4)
1778
1626f1bf164c Documented listen proxy_protocol, $proxy_protocol_addr, $proxy_protocol_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1771
diff changeset
563 <para>
1626f1bf164c Documented listen proxy_protocol, $proxy_protocol_addr, $proxy_protocol_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1771
diff changeset
564 The PROXY protocol must be previously enabled by setting the
1626f1bf164c Documented listen proxy_protocol, $proxy_protocol_addr, $proxy_protocol_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1771
diff changeset
565 <literal>proxy_protocol</literal> parameter
1626f1bf164c Documented listen proxy_protocol, $proxy_protocol_addr, $proxy_protocol_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1771
diff changeset
566 in the <link id="listen"/> directive.
1626f1bf164c Documented listen proxy_protocol, $proxy_protocol_addr, $proxy_protocol_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1771
diff changeset
567 </para>
1626f1bf164c Documented listen proxy_protocol, $proxy_protocol_addr, $proxy_protocol_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1771
diff changeset
568 </tag-desc>
1626f1bf164c Documented listen proxy_protocol, $proxy_protocol_addr, $proxy_protocol_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1771
diff changeset
569
2458
9cd5883ac546 Documented $proxy_protocol_server_addr, $proxy_protocol_server_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2457
diff changeset
570 <tag-name id="var_proxy_protocol_server_addr"><var>$proxy_protocol_server_addr</var></tag-name>
9cd5883ac546 Documented $proxy_protocol_server_addr, $proxy_protocol_server_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2457
diff changeset
571 <tag-desc>
9cd5883ac546 Documented $proxy_protocol_server_addr, $proxy_protocol_server_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2457
diff changeset
572 server address from the PROXY protocol header (1.17.6)
9cd5883ac546 Documented $proxy_protocol_server_addr, $proxy_protocol_server_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2457
diff changeset
573 <para>
9cd5883ac546 Documented $proxy_protocol_server_addr, $proxy_protocol_server_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2457
diff changeset
574 The PROXY protocol must be previously enabled by setting the
9cd5883ac546 Documented $proxy_protocol_server_addr, $proxy_protocol_server_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2457
diff changeset
575 <literal>proxy_protocol</literal> parameter
9cd5883ac546 Documented $proxy_protocol_server_addr, $proxy_protocol_server_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2457
diff changeset
576 in the <link id="listen"/> directive.
9cd5883ac546 Documented $proxy_protocol_server_addr, $proxy_protocol_server_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2457
diff changeset
577 </para>
9cd5883ac546 Documented $proxy_protocol_server_addr, $proxy_protocol_server_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2457
diff changeset
578 </tag-desc>
9cd5883ac546 Documented $proxy_protocol_server_addr, $proxy_protocol_server_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2457
diff changeset
579
9cd5883ac546 Documented $proxy_protocol_server_addr, $proxy_protocol_server_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2457
diff changeset
580 <tag-name id="var_proxy_protocol_server_port"><var>$proxy_protocol_server_port</var></tag-name>
9cd5883ac546 Documented $proxy_protocol_server_addr, $proxy_protocol_server_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2457
diff changeset
581 <tag-desc>
9cd5883ac546 Documented $proxy_protocol_server_addr, $proxy_protocol_server_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2457
diff changeset
582 server port from the PROXY protocol header (1.17.6)
9cd5883ac546 Documented $proxy_protocol_server_addr, $proxy_protocol_server_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2457
diff changeset
583 <para>
9cd5883ac546 Documented $proxy_protocol_server_addr, $proxy_protocol_server_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2457
diff changeset
584 The PROXY protocol must be previously enabled by setting the
9cd5883ac546 Documented $proxy_protocol_server_addr, $proxy_protocol_server_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2457
diff changeset
585 <literal>proxy_protocol</literal> parameter
9cd5883ac546 Documented $proxy_protocol_server_addr, $proxy_protocol_server_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2457
diff changeset
586 in the <link id="listen"/> directive.
9cd5883ac546 Documented $proxy_protocol_server_addr, $proxy_protocol_server_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2457
diff changeset
587 </para>
9cd5883ac546 Documented $proxy_protocol_server_addr, $proxy_protocol_server_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2457
diff changeset
588 </tag-desc>
9cd5883ac546 Documented $proxy_protocol_server_addr, $proxy_protocol_server_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2457
diff changeset
589
2903
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
590 <tag-name id="var_proxy_protocol_tlv_"><var>$proxy_protocol_tlv_</var><value>name</value></tag-name>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
591 <tag-desc>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
592 TLV from the PROXY Protocol header (1.23.2).
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
593 The <literal>name</literal> can be a TLV type name or its numeric value.
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
594 In the latter case, the value is hexadecimal
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
595 and should be prefixed with <literal>0x</literal>:
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
596
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
597 <example>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
598 $proxy_protocol_tlv_alpn
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
599 $proxy_protocol_tlv_0x01
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
600 </example>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
601 SSL TLVs can also be accessed by TLV type name or its numeric value,
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
602 both prefixed by <literal>ssl_</literal>:
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
603 <example>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
604 $proxy_protocol_tlv_ssl_version
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
605 $proxy_protocol_tlv_ssl_0x21
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
606 </example>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
607
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
608 <para>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
609 The following TLV type names are supported:
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
610 <list type="bullet">
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
611
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
612 <listitem>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
613 <literal>alpn</literal> (<literal>0x01</literal>)&mdash;
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
614 upper layer protocol used over the connection
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
615 </listitem>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
616
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
617 <listitem>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
618 <literal>authority</literal> (<literal>0x02</literal>)&mdash;
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
619 host name value passed by the client
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
620 </listitem>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
621
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
622 <listitem>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
623 <literal>unique_id</literal> (<literal>0x05</literal>)&mdash;
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
624 unique connection id
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
625 </listitem>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
626
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
627 <listitem>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
628 <literal>netns</literal> (<literal>0x30</literal>)&mdash;
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
629 name of the namespace
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
630 </listitem>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
631
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
632 <listitem>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
633 <literal>ssl</literal> (<literal>0x20</literal>)&mdash;
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
634 binary SSL TLV structure
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
635 </listitem>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
636
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
637 </list>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
638 </para>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
639
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
640 <para>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
641 The following SSL TLV type names are supported:
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
642 <list type="bullet">
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
643
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
644 <listitem>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
645 <literal>ssl_version</literal> (<literal>0x21</literal>)&mdash;
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
646 SSL version used in client connection
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
647 </listitem>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
648
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
649 <listitem>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
650 <literal>ssl_cn</literal> (<literal>0x22</literal>)&mdash;
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
651 SSL certificate Common Name
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
652 </listitem>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
653
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
654 <listitem>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
655 <literal>ssl_cipher</literal> (<literal>0x23</literal>)&mdash;
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
656 name of the used cipher
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
657 </listitem>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
658
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
659 <listitem>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
660 <literal>ssl_sig_alg</literal> (<literal>0x24</literal>)&mdash;
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
661 algorithm used to sign the certificate
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
662 </listitem>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
663
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
664 <listitem>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
665 <literal>ssl_key_alg</literal> (<literal>0x25</literal>)&mdash;
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
666 public-key algorithm
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
667 </listitem>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
668
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
669 </list>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
670 </para>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
671
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
672 <para>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
673 Also, the following special SSL TLV type name is supported:
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
674 <list type="bullet">
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
675
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
676 <listitem>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
677 <literal>ssl_verify</literal>&mdash;
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
678 client SSL certificate verification result,
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
679 zero if the client presented a certificate
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
680 and it was successfully verified, and non-zero otherwise
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
681 </listitem>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
682
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
683 </list>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
684 </para>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
685
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
686 <para>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
687 The PROXY protocol must be previously enabled by setting the
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
688 <literal>proxy_protocol</literal> parameter
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
689 in the <link id="listen"/> directive.
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
690 </para>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
691 </tag-desc>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
692
1742
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
693 <tag-name id="var_remote_addr"><var>$remote_addr</var></tag-name>
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
694 <tag-desc>
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
695 client address
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
696 </tag-desc>
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
697
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
698 <tag-name id="var_remote_port"><var>$remote_port</var></tag-name>
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
699 <tag-desc>
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
700 client port
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
701 </tag-desc>
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
702
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
703 <tag-name id="var_server_addr"><var>$server_addr</var></tag-name>
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
704 <tag-desc>
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
705 an address of the server which accepted a connection
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
706 <para>
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
707 Computing a value of this variable usually requires one system call.
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
708 To avoid a system call, the <link id="listen"/> directives
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
709 must specify addresses and use the <literal>bind</literal> parameter.
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
710 </para>
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
711 </tag-desc>
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
712
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
713 <tag-name id="var_server_port"><var>$server_port</var></tag-name>
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
714 <tag-desc>
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
715 port of the server which accepted a connection
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
716 </tag-desc>
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
717
1768
061b590cbe1a Documented $bytes_received, $session_time, $protocol in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1753
diff changeset
718 <tag-name id="var_session_time"><var>$session_time</var></tag-name>
061b590cbe1a Documented $bytes_received, $session_time, $protocol in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1753
diff changeset
719 <tag-desc>
061b590cbe1a Documented $bytes_received, $session_time, $protocol in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1753
diff changeset
720 session duration in seconds with a milliseconds resolution
061b590cbe1a Documented $bytes_received, $session_time, $protocol in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1753
diff changeset
721 (1.11.4);
061b590cbe1a Documented $bytes_received, $session_time, $protocol in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1753
diff changeset
722 </tag-desc>
061b590cbe1a Documented $bytes_received, $session_time, $protocol in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1753
diff changeset
723
1771
6a30f04a0208 Documented the $status variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1768
diff changeset
724 <tag-name id="var_status"><var>$status</var></tag-name>
6a30f04a0208 Documented the $status variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1768
diff changeset
725 <tag-desc>
6a30f04a0208 Documented the $status variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1768
diff changeset
726 session status (1.11.4), can be one of the following:
6a30f04a0208 Documented the $status variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1768
diff changeset
727 <list type="tag">
6a30f04a0208 Documented the $status variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1768
diff changeset
728
6a30f04a0208 Documented the $status variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1768
diff changeset
729 <tag-name><literal>200</literal></tag-name>
6a30f04a0208 Documented the $status variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1768
diff changeset
730 <tag-desc>
6a30f04a0208 Documented the $status variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1768
diff changeset
731 session completed successfully
6a30f04a0208 Documented the $status variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1768
diff changeset
732 </tag-desc>
6a30f04a0208 Documented the $status variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1768
diff changeset
733
1780
8df9ba4e56c6 Documented 400 error in stream $status.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1778
diff changeset
734 <tag-name><literal>400</literal></tag-name>
8df9ba4e56c6 Documented 400 error in stream $status.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1778
diff changeset
735 <tag-desc>
8df9ba4e56c6 Documented 400 error in stream $status.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1778
diff changeset
736 client data could not be parsed, for example,
8df9ba4e56c6 Documented 400 error in stream $status.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1778
diff changeset
737 the <link id="proxy_protocol">PROXY protocol</link> header
8df9ba4e56c6 Documented 400 error in stream $status.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1778
diff changeset
738 </tag-desc>
8df9ba4e56c6 Documented 400 error in stream $status.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1778
diff changeset
739
1771
6a30f04a0208 Documented the $status variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1768
diff changeset
740 <tag-name><literal>403</literal></tag-name>
6a30f04a0208 Documented the $status variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1768
diff changeset
741 <tag-desc>
6a30f04a0208 Documented the $status variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1768
diff changeset
742 access forbidden, for example, when access is limited for
6a30f04a0208 Documented the $status variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1768
diff changeset
743 <link doc="ngx_stream_access_module.xml">certain client addresses</link>
6a30f04a0208 Documented the $status variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1768
diff changeset
744 </tag-desc>
6a30f04a0208 Documented the $status variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1768
diff changeset
745
6a30f04a0208 Documented the $status variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1768
diff changeset
746 <tag-name><literal>500</literal></tag-name>
6a30f04a0208 Documented the $status variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1768
diff changeset
747 <tag-desc>
6a30f04a0208 Documented the $status variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1768
diff changeset
748 internal server error
6a30f04a0208 Documented the $status variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1768
diff changeset
749 </tag-desc>
6a30f04a0208 Documented the $status variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1768
diff changeset
750
6a30f04a0208 Documented the $status variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1768
diff changeset
751 <tag-name><literal>502</literal></tag-name>
6a30f04a0208 Documented the $status variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1768
diff changeset
752 <tag-desc>
6a30f04a0208 Documented the $status variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1768
diff changeset
753 bad gateway, for example,
6a30f04a0208 Documented the $status variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1768
diff changeset
754 if an upstream server could not be selected or reached.
6a30f04a0208 Documented the $status variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1768
diff changeset
755 </tag-desc>
6a30f04a0208 Documented the $status variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1768
diff changeset
756
6a30f04a0208 Documented the $status variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1768
diff changeset
757 <tag-name><literal>503</literal></tag-name>
6a30f04a0208 Documented the $status variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1768
diff changeset
758 <tag-desc>
6a30f04a0208 Documented the $status variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1768
diff changeset
759 service unavailable, for example, when access is limited by the
6a30f04a0208 Documented the $status variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1768
diff changeset
760 <link doc="ngx_stream_limit_conn_module.xml">number of connections</link>
6a30f04a0208 Documented the $status variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1768
diff changeset
761 </tag-desc>
6a30f04a0208 Documented the $status variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1768
diff changeset
762
6a30f04a0208 Documented the $status variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1768
diff changeset
763 </list>
6a30f04a0208 Documented the $status variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1768
diff changeset
764 </tag-desc>
6a30f04a0208 Documented the $status variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1768
diff changeset
765
1742
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
766 <tag-name id="var_time_iso8601"><var>$time_iso8601</var></tag-name>
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
767 <tag-desc>
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
768 local time in the ISO 8601 standard format
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
769 </tag-desc>
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
770
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
771 <tag-name id="var_time_local"><var>$time_local</var></tag-name>
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
772 <tag-desc>
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
773 local time in the Common Log Format
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
774 </tag-desc>
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
775
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
776 </list>
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
777 </para>
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
778
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
779 </section>
c511b73da3a9 Documented variables in ngx_stream_core_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1741
diff changeset
780
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
781 </module>