Mercurial > hg > nginx-site
comparison xml/en/docs/stream/ngx_stream_core_module.xml @ 1662:48615cf80e20
Documented the UDP proxy functionality.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Tue, 15 Mar 2016 16:31:42 +0300 |
parents | 8ea1813272bb |
children | 93063516f6ff |
comparison
equal
deleted
inserted
replaced
1661:0da7c65fdae5 | 1662:48615cf80e20 |
---|---|
7 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> | 7 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> |
8 | 8 |
9 <module name="Module ngx_stream_core_module" | 9 <module name="Module ngx_stream_core_module" |
10 link="/en/docs/stream/ngx_stream_core_module.html" | 10 link="/en/docs/stream/ngx_stream_core_module.html" |
11 lang="en" | 11 lang="en" |
12 rev="10"> | 12 rev="11"> |
13 | 13 |
14 <section id="summary"> | 14 <section id="summary"> |
15 | 15 |
16 <para> | 16 <para> |
17 The <literal>ngx_stream_core_module</literal> module | 17 The <literal>ngx_stream_core_module</literal> module |
43 server backend1.example.com:12345 weight=5; | 43 server backend1.example.com:12345 weight=5; |
44 server 127.0.0.1:12345 max_fails=3 fail_timeout=30s; | 44 server 127.0.0.1:12345 max_fails=3 fail_timeout=30s; |
45 server unix:/tmp/backend3; | 45 server unix:/tmp/backend3; |
46 } | 46 } |
47 | 47 |
48 upstream dns { | |
49 server 192.168.0.1:53535; | |
50 server dns.example.com:53; | |
51 } | |
52 | |
48 server { | 53 server { |
49 listen 12345; | 54 listen 12345; |
50 proxy_connect_timeout 1s; | 55 proxy_connect_timeout 1s; |
51 proxy_timeout 3s; | 56 proxy_timeout 3s; |
52 proxy_pass backend; | 57 proxy_pass backend; |
53 } | 58 } |
54 | 59 |
55 server { | 60 server { |
61 listen 127.0.0.1:53 udp; | |
62 proxy_responses 1; | |
63 proxy_timeout 20s; | |
64 proxy_pass dns; | |
65 } | |
66 | |
67 server { | |
56 listen [::1]:12345; | 68 listen [::1]:12345; |
57 proxy_pass unix:/tmp/stream.socket; | 69 proxy_pass unix:/tmp/stream.socket; |
58 } | 70 } |
59 } | 71 } |
60 </example> | 72 </example> |
67 | 79 |
68 <directive name="listen"> | 80 <directive name="listen"> |
69 <syntax> | 81 <syntax> |
70 <value>address</value>:<value>port</value> | 82 <value>address</value>:<value>port</value> |
71 [<literal>ssl</literal>] | 83 [<literal>ssl</literal>] |
84 [<literal>udp</literal>] | |
72 [<literal>backlog</literal>=<value>number</value>] | 85 [<literal>backlog</literal>=<value>number</value>] |
73 [<literal>bind</literal>] | 86 [<literal>bind</literal>] |
74 [<literal>ipv6only</literal>=<literal>on</literal>|<literal>off</literal>] | 87 [<literal>ipv6only</literal>=<literal>on</literal>|<literal>off</literal>] |
75 [<literal>reuseport</literal>] | 88 [<literal>reuseport</literal>] |
76 [<literal>so_keepalive</literal>=<literal>on</literal>|<literal>off</literal>|[<value>keepidle</value>]:[<value>keepintvl</value>]:[<value>keepcnt</value>]]</syntax> | 89 [<literal>so_keepalive</literal>=<literal>on</literal>|<literal>off</literal>|[<value>keepidle</value>]:[<value>keepintvl</value>]:[<value>keepcnt</value>]]</syntax> |
102 </para> | 115 </para> |
103 | 116 |
104 <para> | 117 <para> |
105 The <literal>ssl</literal> parameter allows specifying that all | 118 The <literal>ssl</literal> parameter allows specifying that all |
106 connections accepted on this port should work in SSL mode. | 119 connections accepted on this port should work in SSL mode. |
120 </para> | |
121 | |
122 <para> | |
123 The <literal>udp</literal> parameter configures a listening socket | |
124 for working with datagrams (1.9.13). | |
107 </para> | 125 </para> |
108 | 126 |
109 <para> | 127 <para> |
110 The <literal>listen</literal> directive | 128 The <literal>listen</literal> directive |
111 can have several additional parameters specific to socket-related system calls. | 129 can have several additional parameters specific to socket-related system calls. |