Mercurial > hg > nginx-site
annotate xml/en/docs/stream/ngx_stream_core_module.xml @ 1700:1dbef8ab47c7
Updated description of service parameter in upstream.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Tue, 26 Apr 2016 19:31:57 +0300 |
parents | 93063516f6ff |
children | a99ebc3af3e4 |
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" |
1686
93063516f6ff
Provided the anchor link for the "listen udp" parameter.
Ruslan Ermilov <ru@nginx.com>
parents:
1662
diff
changeset
|
12 rev="12"> |
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 { |
1662
48615cf80e20
Documented the UDP proxy functionality.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1546
diff
changeset
|
61 listen 127.0.0.1:53 udp; |
48615cf80e20
Documented the UDP proxy functionality.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1546
diff
changeset
|
62 proxy_responses 1; |
48615cf80e20
Documented the UDP proxy functionality.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1546
diff
changeset
|
63 proxy_timeout 20s; |
48615cf80e20
Documented the UDP proxy functionality.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1546
diff
changeset
|
64 proxy_pass dns; |
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 |
48615cf80e20
Documented the UDP proxy functionality.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1546
diff
changeset
|
67 server { |
1405
4569719f4247
Split stream module into stream_core and stream_proxy modules.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1394
diff
changeset
|
68 listen [::1]:12345; |
4569719f4247
Split stream module into stream_core and stream_proxy modules.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1394
diff
changeset
|
69 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
|
70 } |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
71 } |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
72 </example> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
73 </para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
74 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
75 </section> |
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 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
78 <section id="directives" name="Directives"> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
79 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
80 <directive name="listen"> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
81 <syntax> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
82 <value>address</value>:<value>port</value> |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
83 [<literal>ssl</literal>] |
1662
48615cf80e20
Documented the UDP proxy functionality.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1546
diff
changeset
|
84 [<literal>udp</literal>] |
1502
b628e042a15e
Documented "listen backlog=" in mail and stream.
Ruslan Ermilov <ru@nginx.com>
parents:
1500
diff
changeset
|
85 [<literal>backlog</literal>=<value>number</value>] |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
86 [<literal>bind</literal>] |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
87 [<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
|
88 [<literal>reuseport</literal>] |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
89 [<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
|
90 <default/> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
91 <context>server</context> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
92 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
93 <para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
94 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
|
95 on which the server will accept connections. |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
96 It is possible to specify just the port. |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
97 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
|
98 <example> |
1405
4569719f4247
Split stream module into stream_core and stream_proxy modules.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1394
diff
changeset
|
99 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
|
100 listen *:12345; |
4569719f4247
Split stream module into stream_core and stream_proxy modules.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1394
diff
changeset
|
101 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
|
102 listen localhost:12345; |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
103 </example> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
104 IPv6 addresses are specified in square brackets: |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
105 <example> |
1405
4569719f4247
Split stream module into stream_core and stream_proxy modules.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1394
diff
changeset
|
106 listen [::1]:12345; |
4569719f4247
Split stream module into stream_core and stream_proxy modules.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1394
diff
changeset
|
107 listen [::]:12345; |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
108 </example> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
109 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
|
110 prefix: |
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 listen unix:/var/run/nginx.sock; |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
113 </example> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
114 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
115 </para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
116 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
117 <para> |
1462
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
118 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
|
119 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
|
120 </para> |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
121 |
1686
93063516f6ff
Provided the anchor link for the "listen udp" parameter.
Ruslan Ermilov <ru@nginx.com>
parents:
1662
diff
changeset
|
122 <para id="udp"> |
1662
48615cf80e20
Documented the UDP proxy functionality.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1546
diff
changeset
|
123 The <literal>udp</literal> parameter configures a listening socket |
48615cf80e20
Documented the UDP proxy functionality.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1546
diff
changeset
|
124 for working with datagrams (1.9.13). |
48615cf80e20
Documented the UDP proxy functionality.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1546
diff
changeset
|
125 </para> |
48615cf80e20
Documented the UDP proxy functionality.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1546
diff
changeset
|
126 |
48615cf80e20
Documented the UDP proxy functionality.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1546
diff
changeset
|
127 <para> |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
128 The <literal>listen</literal> directive |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
129 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
|
130 <list type="tag"> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
131 |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
132 <tag-name> |
1502
b628e042a15e
Documented "listen backlog=" in mail and stream.
Ruslan Ermilov <ru@nginx.com>
parents:
1500
diff
changeset
|
133 <literal>backlog</literal>=<value>number</value> |
b628e042a15e
Documented "listen backlog=" in mail and stream.
Ruslan Ermilov <ru@nginx.com>
parents:
1500
diff
changeset
|
134 </tag-name> |
b628e042a15e
Documented "listen backlog=" in mail and stream.
Ruslan Ermilov <ru@nginx.com>
parents:
1500
diff
changeset
|
135 <tag-desc> |
b628e042a15e
Documented "listen backlog=" in mail and stream.
Ruslan Ermilov <ru@nginx.com>
parents:
1500
diff
changeset
|
136 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
|
137 <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
|
138 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
|
139 By default, |
b628e042a15e
Documented "listen backlog=" in mail and stream.
Ruslan Ermilov <ru@nginx.com>
parents:
1500
diff
changeset
|
140 <literal>backlog</literal> is set to -1 on FreeBSD, DragonFly BSD, and Mac OS X, |
b628e042a15e
Documented "listen backlog=" in mail and stream.
Ruslan Ermilov <ru@nginx.com>
parents:
1500
diff
changeset
|
141 and to 511 on other platforms. |
b628e042a15e
Documented "listen backlog=" in mail and stream.
Ruslan Ermilov <ru@nginx.com>
parents:
1500
diff
changeset
|
142 </tag-desc> |
b628e042a15e
Documented "listen backlog=" in mail and stream.
Ruslan Ermilov <ru@nginx.com>
parents:
1500
diff
changeset
|
143 |
b628e042a15e
Documented "listen backlog=" in mail and stream.
Ruslan Ermilov <ru@nginx.com>
parents:
1500
diff
changeset
|
144 <tag-name> |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
145 <literal>bind</literal> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
146 </tag-name> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
147 <tag-desc> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
148 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
|
149 call for a given address:port pair. |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
150 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
|
151 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
|
152 <literal>listen</literal> directives listens on all addresses |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
153 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
|
154 <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
|
155 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
|
156 made in this case to determine the address that accepted the connection. |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
157 If the <literal>ipv6only</literal> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
158 or <literal>so_keepalive</literal> parameters |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
159 are used then for a given |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
160 <value>address</value>:<value>port</value> pair |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
161 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
|
162 </tag-desc> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
163 |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
164 <tag-name> |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
165 <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
|
166 </tag-name> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
167 <tag-desc> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
168 this parameter determines |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
169 (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
|
170 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
|
171 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
|
172 This parameter is turned on by default. |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
173 It can only be set once on start. |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
174 </tag-desc> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
175 |
1507
14180fa9a518
Added ids for reuseport, mentioned reuseport in news.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1502
diff
changeset
|
176 <tag-name id="reuseport"> |
1493
9faa78768252
Documented the "reuseport" option of the "listen" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1462
diff
changeset
|
177 <literal>reuseport</literal> |
9faa78768252
Documented the "reuseport" option of the "listen" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1462
diff
changeset
|
178 </tag-name> |
9faa78768252
Documented the "reuseport" option of the "listen" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1462
diff
changeset
|
179 <tag-desc> |
9faa78768252
Documented the "reuseport" option of the "listen" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1462
diff
changeset
|
180 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
|
181 for each worker process |
9faa78768252
Documented the "reuseport" option of the "listen" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1462
diff
changeset
|
182 (using the <c-def>SO_REUSEPORT</c-def> socket option), allowing a kernel |
1496
99ce48c8cce3
Corrected the "reuseport" description of the "listen" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1493
diff
changeset
|
183 to distribute incoming connections between worker processes. |
1500
cd534da03d02
Added Linux kernel version in reuseport.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1496
diff
changeset
|
184 This currently works only on Linux 3.9+ and DragonFly BSD. |
1493
9faa78768252
Documented the "reuseport" option of the "listen" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1462
diff
changeset
|
185 <note> |
9faa78768252
Documented the "reuseport" option of the "listen" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1462
diff
changeset
|
186 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
|
187 <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
|
188 </note> |
9faa78768252
Documented the "reuseport" option of the "listen" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1462
diff
changeset
|
189 </tag-desc> |
9faa78768252
Documented the "reuseport" option of the "listen" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1462
diff
changeset
|
190 |
9faa78768252
Documented the "reuseport" option of the "listen" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1462
diff
changeset
|
191 <tag-name> |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
192 <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
|
193 </tag-name> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
194 <tag-desc> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
195 this parameter configures the “TCP keepalive” behavior |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
196 for the listening socket. |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
197 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
|
198 in effect for the socket. |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
199 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
|
200 <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
|
201 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
|
202 <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
|
203 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
|
204 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
|
205 <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
|
206 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
|
207 FreeBSD 9.0-STABLE), they can be configured |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
208 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
|
209 <value>keepcnt</value> parameters. |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
210 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
|
211 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
|
212 For example, |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
213 <example>so_keepalive=30m::10</example> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
214 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
|
215 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
|
216 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
|
217 </tag-desc> |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
218 |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
219 </list> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
220 </para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
221 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
222 <para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
223 Different servers must listen on different |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
224 <value>address</value>:<value>port</value> pairs. |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
225 </para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
226 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
227 </directive> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
228 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
229 |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
230 <directive name="resolver"> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
231 <syntax> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
232 <value>address</value> ... |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
233 [<literal>valid</literal>=<value>time</value>] |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
234 [<literal>ipv6</literal>=<literal>on</literal>|<literal>off</literal>]</syntax> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
235 <default/> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
236 <context>stream</context> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
237 <context>server</context> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
238 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
239 <para> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
240 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
|
241 into addresses, for example: |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
242 <example> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
243 resolver 127.0.0.1 [::1]:5353; |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
244 </example> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
245 An address can be specified as a domain name or IP address, |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
246 and an optional port. |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
247 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
|
248 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
|
249 </para> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
250 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
251 <para> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
252 By default, nginx will look up both IPv4 and IPv6 addresses while resolving. |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
253 If looking up of IPv6 addresses is not desired, |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
254 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
|
255 </para> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
256 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
257 <para> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
258 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
|
259 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
|
260 <example> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
261 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
|
262 </example> |
1462
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
263 <note> |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
264 This directive is available as part of our |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
265 <commercial_version>commercial subscription</commercial_version>. |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
266 </note> |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
267 </para> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
268 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
269 </directive> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
270 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
271 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
272 <directive name="resolver_timeout"> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
273 <syntax><value>time</value></syntax> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
274 <default>30s</default> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
275 <context>stream</context> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
276 <context>server</context> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
277 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
278 <para> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
279 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
|
280 <example> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
281 resolver_timeout 5s; |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
282 </example> |
1462
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
283 <note> |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
284 This directive is available as part of our |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
285 <commercial_version>commercial subscription</commercial_version>. |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
286 </note> |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
287 </para> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
288 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
289 </directive> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
290 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1405
diff
changeset
|
291 |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
292 <directive name="server"> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
293 <syntax block="yes"/> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
294 <default/> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
295 <context>stream</context> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
296 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
297 <para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
298 Sets the configuration for a server. |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
299 </para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
300 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
301 </directive> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
302 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
303 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
304 <directive name="stream"> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
305 <syntax block="yes"/> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
306 <default/> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
307 <context>main</context> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
308 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
309 <para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
310 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
|
311 are specified. |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
312 </para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
313 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
314 </directive> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
315 |
1546
8ea1813272bb
Documented the tcp_nodelay directive for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1528
diff
changeset
|
316 |
8ea1813272bb
Documented the tcp_nodelay directive for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1528
diff
changeset
|
317 <directive name="tcp_nodelay"> |
8ea1813272bb
Documented the tcp_nodelay directive for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1528
diff
changeset
|
318 <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
|
319 <default>on</default> |
8ea1813272bb
Documented the tcp_nodelay directive for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1528
diff
changeset
|
320 <context>stream</context> |
8ea1813272bb
Documented the tcp_nodelay directive for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1528
diff
changeset
|
321 <context>server</context> |
8ea1813272bb
Documented the tcp_nodelay directive for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1528
diff
changeset
|
322 <appeared-in>1.9.4</appeared-in> |
8ea1813272bb
Documented the tcp_nodelay directive for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1528
diff
changeset
|
323 |
8ea1813272bb
Documented the tcp_nodelay directive for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1528
diff
changeset
|
324 <para> |
8ea1813272bb
Documented the tcp_nodelay directive for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1528
diff
changeset
|
325 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
|
326 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
|
327 </para> |
8ea1813272bb
Documented the tcp_nodelay directive for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1528
diff
changeset
|
328 |
8ea1813272bb
Documented the tcp_nodelay directive for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1528
diff
changeset
|
329 </directive> |
8ea1813272bb
Documented the tcp_nodelay directive for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1528
diff
changeset
|
330 |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
331 </section> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
332 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
333 </module> |