Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
nginx
GitHub Repository: nginx/nginx.org
Path: blob/main/xml/en/docs/http/ngx_http_grpc_module.xml
1 views
1
<?xml version="1.0"?>
2
3
<!--
4
Copyright (C) Igor Sysoev
5
Copyright (C) Nginx, Inc.
6
-->
7
8
<!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">
9
10
<module name="Module ngx_http_grpc_module"
11
link="/en/docs/http/ngx_http_grpc_module.html"
12
lang="en"
13
rev="18">
14
15
<section id="summary">
16
17
<para>
18
The <literal>ngx_http_grpc_module</literal> module allows passing requests
19
to a gRPC server (1.13.10).
20
The module requires the
21
<link doc="ngx_http_v2_module.xml">ngx_http_v2_module</link> module.
22
</para>
23
24
</section>
25
26
27
<section id="example" name="Example Configuration">
28
29
<para>
30
<example>
31
server {
32
listen 9000;
33
34
http2 on;
35
36
location / {
37
grpc_pass 127.0.0.1:9000;
38
}
39
}
40
</example>
41
</para>
42
43
</section>
44
45
46
<section id="directives" name="Directives">
47
48
<directive name="grpc_allow_upstream">
49
<syntax><value>address</value></syntax>
50
<default/>
51
<context>http</context>
52
<context>server</context>
53
<context>location</context>
54
<appeared-in>1.29.3</appeared-in>
55
56
<para>
57
Defines conditions under which access to a gRPC server
58
is allowed or <link id="denied">denied</link>.
59
If all string parameters are not empty
60
and not equal to “0” then the access is allowed.
61
The conditions are evaluated each time
62
before a connection to a gRPC server is established.
63
Parameter values can contain variables:
64
<example>
65
geo $upstream_last_addr $allow {
66
volatile;
67
10.10.0.0/24 1;
68
}
69
70
server {
71
listen 127.0.0.1:8080;
72
http2 on;
73
74
location / {
75
grpc_pass localhost:9000;
76
grpc_allow_upstream $allow;
77
...
78
}
79
}
80
</example>
81
</para>
82
83
<para>
84
<note>
85
This directive is available as part of our
86
<commercial_version>commercial subscription</commercial_version>.
87
</note>
88
</para>
89
90
</directive>
91
92
93
<directive name="grpc_bind">
94
<syntax>
95
<value>address</value>
96
[<literal>transparent </literal>] |
97
<literal>off</literal></syntax>
98
<default/>
99
<context>http</context>
100
<context>server</context>
101
<context>location</context>
102
103
<para>
104
Makes outgoing connections to a gRPC server originate
105
from the specified local IP address with an optional port.
106
Parameter value can contain variables.
107
The special value <literal>off</literal> cancels the effect
108
of the <literal>grpc_bind</literal> directive
109
inherited from the previous configuration level, which allows the
110
system to auto-assign the local IP address and port.
111
</para>
112
113
<para id="grpc_bind_transparent">
114
The <literal>transparent</literal> parameter allows
115
outgoing connections to a gRPC server originate
116
from a non-local IP address,
117
for example, from a real IP address of a client:
118
<example>
119
grpc_bind $remote_addr transparent;
120
</example>
121
In order for this parameter to work,
122
it is usually necessary to run nginx worker processes with the
123
<link doc="../ngx_core_module.xml" id="user">superuser</link> privileges.
124
On Linux it is not required as if
125
the <literal>transparent</literal> parameter is specified, worker processes
126
inherit the <literal>CAP_NET_RAW</literal> capability from the master process.
127
It is also necessary to configure kernel routing table
128
to intercept network traffic from the gRPC server.
129
</para>
130
131
</directive>
132
133
134
<directive name="grpc_bind_dynamic">
135
<syntax><literal>on</literal> | <literal>off</literal></syntax>
136
<default>off</default>
137
<context>http</context>
138
<context>server</context>
139
<context>location</context>
140
<appeared-in>1.29.3</appeared-in>
141
142
<para>
143
When enabled, makes the <link id="grpc_bind">bind</link> operation
144
at each connection attempt.
145
</para>
146
147
<para>
148
<note>
149
This directive is available as part of our
150
<commercial_version>commercial subscription</commercial_version>.
151
</note>
152
</para>
153
154
</directive>
155
156
157
<directive name="grpc_buffer_size">
158
<syntax><value>size</value></syntax>
159
<default>4k|8k</default>
160
<context>http</context>
161
<context>server</context>
162
<context>location</context>
163
164
<para>
165
Sets the <value>size</value> of the buffer used for reading the response
166
received from the gRPC server.
167
The first part of the response usually contains a small header;
168
if it exceeds the buffer size, the response is considered
169
<link id="invalid_header">invalid</link>.
170
The response is passed to the client synchronously, as soon as it is received.
171
By default, the buffer size is equal to one memory page.
172
This is either 4K or 8K, depending on a platform.
173
It can be made smaller, however.
174
</para>
175
176
</directive>
177
178
179
<directive name="grpc_connect_timeout">
180
<syntax><value>time</value></syntax>
181
<default>60s</default>
182
<context>http</context>
183
<context>server</context>
184
<context>location</context>
185
186
<para>
187
Defines a timeout for establishing a connection with a gRPC server.
188
It should be noted that this timeout cannot usually exceed 75 seconds.
189
</para>
190
191
</directive>
192
193
194
<directive name="grpc_hide_header">
195
<syntax><value>field</value></syntax>
196
<default/>
197
<context>http</context>
198
<context>server</context>
199
<context>location</context>
200
201
<para>
202
By default,
203
nginx does not pass the header fields <header>Date</header>,
204
<header>Server</header>, and
205
<header>X-Accel-...</header> from the response of a gRPC
206
server to a client.
207
The <literal>grpc_hide_header</literal> directive sets additional fields
208
that will not be passed.
209
If, on the contrary, the passing of fields needs to be permitted,
210
the <link id="grpc_pass_header"/> directive can be used.
211
</para>
212
213
</directive>
214
215
216
<directive name="grpc_ignore_headers">
217
<syntax><value>field</value> ...</syntax>
218
<default/>
219
<context>http</context>
220
<context>server</context>
221
<context>location</context>
222
223
<para>
224
Disables processing of certain response header fields from the gRPC server.
225
The following fields can be ignored: <header>X-Accel-Redirect</header>
226
and <header>X-Accel-Charset</header>.
227
</para>
228
229
<para>
230
If not disabled, processing of these header fields has the following
231
effect:
232
<list type="bullet" compact="no">
233
234
<listitem>
235
<header>X-Accel-Redirect</header> performs an
236
<link doc="ngx_http_core_module.xml" id="internal">internal
237
redirect</link> to the specified URI;
238
</listitem>
239
240
<listitem>
241
<header>X-Accel-Charset</header> sets the desired
242
<link doc="ngx_http_charset_module.xml" id="charset"/>
243
of a response.
244
</listitem>
245
246
</list>
247
</para>
248
249
</directive>
250
251
252
<directive name="grpc_intercept_errors">
253
<syntax><literal>on</literal> | <literal>off</literal></syntax>
254
<default>off</default>
255
<context>http</context>
256
<context>server</context>
257
<context>location</context>
258
259
<para>
260
Determines whether gRPC server responses with codes greater than or equal
261
to 300 should be passed to a client
262
or be intercepted and redirected to nginx for processing
263
with the <link doc="ngx_http_core_module.xml" id="error_page"/> directive.
264
</para>
265
266
</directive>
267
268
269
<directive name="grpc_next_upstream">
270
<syntax>
271
<literal>error</literal> |
272
<literal>timeout</literal> |
273
<literal>denied</literal> |
274
<literal>invalid_header</literal> |
275
<literal>http_500</literal> |
276
<literal>http_502</literal> |
277
<literal>http_503</literal> |
278
<literal>http_504</literal> |
279
<literal>http_403</literal> |
280
<literal>http_404</literal> |
281
<literal>http_429</literal> |
282
<literal>non_idempotent</literal> |
283
<literal>off</literal>
284
...</syntax>
285
<default>error timeout</default>
286
<context>http</context>
287
<context>server</context>
288
<context>location</context>
289
290
<para>
291
Specifies in which cases a request should be passed to the next server:
292
<list type="tag">
293
294
<tag-name><literal>error</literal></tag-name>
295
<tag-desc>an error occurred while establishing a connection with the
296
server, passing a request to it, or reading the response header;</tag-desc>
297
298
<tag-name><literal>timeout</literal></tag-name>
299
<tag-desc>a timeout has occurred while establishing a connection with the
300
server, passing a request to it, or reading the response header;</tag-desc>
301
302
<tag-name id="denied"><literal>denied</literal></tag-name>
303
<tag-desc>the server <link id="grpc_allow_upstream">denied</link>
304
the connection (1.29.3);
305
<para>
306
<note>
307
This parameter is available as part of our
308
<commercial_version>commercial subscription</commercial_version>.
309
</note>
310
</para>
311
</tag-desc>
312
313
<tag-name id="invalid_header"><literal>invalid_header</literal></tag-name>
314
<tag-desc>a server returned an empty or invalid response;</tag-desc>
315
316
<tag-name><literal>http_500</literal></tag-name>
317
<tag-desc>a server returned a response with the code 500;</tag-desc>
318
319
<tag-name><literal>http_502</literal></tag-name>
320
<tag-desc>a server returned a response with the code 502;</tag-desc>
321
322
<tag-name><literal>http_503</literal></tag-name>
323
<tag-desc>a server returned a response with the code 503;</tag-desc>
324
325
<tag-name><literal>http_504</literal></tag-name>
326
<tag-desc>a server returned a response with the code 504;</tag-desc>
327
328
<tag-name><literal>http_403</literal></tag-name>
329
<tag-desc>a server returned a response with the code 403;</tag-desc>
330
331
<tag-name><literal>http_404</literal></tag-name>
332
<tag-desc>a server returned a response with the code 404;</tag-desc>
333
334
<tag-name><literal>http_429</literal></tag-name>
335
<tag-desc>a server returned a response with the code 429;</tag-desc>
336
337
<tag-name id="non_idempotent"><literal>non_idempotent</literal></tag-name>
338
<tag-desc>normally, requests with a
339
<link url="https://datatracker.ietf.org/doc/html/rfc7231#section-4.2.2">non-idempotent</link>
340
method
341
(<literal>POST</literal>, <literal>LOCK</literal>, <literal>PATCH</literal>)
342
are not passed to the next server
343
if a request has been sent to an upstream server;
344
enabling this option explicitly allows retrying such requests;
345
</tag-desc>
346
347
<tag-name><literal>off</literal></tag-name>
348
<tag-desc>disables passing a request to the next server.</tag-desc>
349
350
</list>
351
</para>
352
353
<para>
354
One should bear in mind that passing a request to the next server is
355
only possible if nothing has been sent to a client yet.
356
That is, if an error or timeout occurs in the middle of the
357
transferring of a response, fixing this is impossible.
358
</para>
359
360
<para>
361
The directive also defines what is considered an
362
<link doc="ngx_http_upstream_module.xml" id="max_fails">unsuccessful
363
attempt</link> of communication with a server.
364
The cases of <literal>error</literal>, <literal>timeout</literal>,
365
<literal>denied</literal> and
366
<literal>invalid_header</literal> are always considered unsuccessful attempts,
367
even if they are not specified in the directive.
368
The cases of <literal>http_500</literal>, <literal>http_502</literal>,
369
<literal>http_503</literal>, <literal>http_504</literal>,
370
and <literal>http_429</literal> are
371
considered unsuccessful attempts only if they are specified in the directive.
372
The cases of <literal>http_403</literal> and <literal>http_404</literal>
373
are never considered unsuccessful attempts.
374
</para>
375
376
<para>
377
Passing a request to the next server can be limited by
378
<link id="grpc_next_upstream_tries">the number of tries</link>
379
and by <link id="grpc_next_upstream_timeout">time</link>.
380
</para>
381
382
</directive>
383
384
385
<directive name="grpc_next_upstream_timeout">
386
<syntax><value>time</value></syntax>
387
<default>0</default>
388
<context>http</context>
389
<context>server</context>
390
<context>location</context>
391
392
<para>
393
Limits the time during which a request can be passed to the
394
<link id="grpc_next_upstream">next server</link>.
395
The <literal>0</literal> value turns off this limitation.
396
</para>
397
398
</directive>
399
400
401
<directive name="grpc_next_upstream_tries">
402
<syntax><value>number</value></syntax>
403
<default>0</default>
404
<context>http</context>
405
<context>server</context>
406
<context>location</context>
407
408
<para>
409
Limits the number of possible tries for passing a request to the
410
<link id="grpc_next_upstream">next server</link>.
411
The <literal>0</literal> value turns off this limitation.
412
</para>
413
414
</directive>
415
416
417
<directive name="grpc_pass">
418
<syntax><value>address</value></syntax>
419
<default/>
420
<context>location</context>
421
<context>if in location</context>
422
423
<para>
424
Sets the gRPC server address.
425
The address can be specified as a domain name or IP address,
426
and a port:
427
<example>
428
grpc_pass localhost:9000;
429
</example>
430
or as a UNIX-domain socket path:
431
<example>
432
grpc_pass unix:/tmp/grpc.socket;
433
</example>
434
Alternatively, the “<literal>grpc://</literal>” scheme can be used:
435
<example>
436
grpc_pass grpc://127.0.0.1:9000;
437
</example>
438
To use gRPC over SSL, the “<literal>grpcs://</literal>” scheme should be used:
439
<example>
440
grpc_pass grpcs://127.0.0.1:443;
441
</example>
442
</para>
443
444
<para>
445
If a domain name resolves to several addresses, all of them will be
446
used in a round-robin fashion.
447
In addition, an address can be specified as a
448
<link doc="ngx_http_upstream_module.xml">server group</link>.
449
</para>
450
451
<para>
452
Parameter value can contain variables (1.17.8).
453
In this case, if an address is specified as a domain name,
454
the name is searched among the described
455
<link doc="ngx_http_upstream_module.xml">server groups</link>,
456
and, if not found, is determined using a
457
<link doc="ngx_http_core_module.xml" id="resolver"/>.
458
</para>
459
460
<para>
461
<note>
462
Trailer fields received from
463
an upstream server are passed to a client as is, without interpretation.
464
</note>
465
</para>
466
467
</directive>
468
469
470
<directive name="grpc_pass_header">
471
<syntax><value>field</value></syntax>
472
<default/>
473
<context>http</context>
474
<context>server</context>
475
<context>location</context>
476
477
<para>
478
Permits passing <link id="grpc_hide_header">otherwise disabled</link> header
479
fields from a gRPC server to a client.
480
</para>
481
482
</directive>
483
484
485
<directive name="grpc_read_timeout">
486
<syntax><value>time</value></syntax>
487
<default>60s</default>
488
<context>http</context>
489
<context>server</context>
490
<context>location</context>
491
492
<para>
493
Defines a timeout for reading a response from the gRPC server.
494
The timeout is set only between two successive read operations,
495
not for the transmission of the whole response.
496
If the gRPC server does not transmit anything within this time,
497
the connection is closed.
498
</para>
499
500
</directive>
501
502
503
<directive name="grpc_request_dynamic">
504
<syntax><literal>on</literal> | <literal>off</literal></syntax>
505
<default>off</default>
506
<context>http</context>
507
<context>server</context>
508
<context>location</context>
509
<appeared-in>1.29.3</appeared-in>
510
511
<para>
512
Enables or disables creation of a separate request instance
513
for each gRPC server.
514
By default, a single request is used for all gRPC servers.
515
If enabled, a separate request instance is created,
516
allowing per-server request customization.
517
For example, the server-specific <header>Host</header> request header field
518
can be set:
519
<example>
520
grpc_request_dynamic on;
521
grpc_set_header Host $upstream_last_server_name;
522
</example>
523
</para>
524
525
<para>
526
<note>
527
This directive is available as part of our
528
<commercial_version>commercial subscription</commercial_version>.
529
</note>
530
</para>
531
532
</directive>
533
534
535
<directive name="grpc_send_timeout">
536
<syntax><value>time</value></syntax>
537
<default>60s</default>
538
<context>http</context>
539
<context>server</context>
540
<context>location</context>
541
542
<para>
543
Sets a timeout for transmitting a request to the gRPC server.
544
The timeout is set only between two successive write operations,
545
not for the transmission of the whole request.
546
If the gRPC server does not receive anything within this time,
547
the connection is closed.
548
</para>
549
550
</directive>
551
552
553
<directive name="grpc_set_header">
554
<syntax><value>field</value> <value>value</value></syntax>
555
<default>Content-Length $content_length</default>
556
<context>http</context>
557
<context>server</context>
558
<context>location</context>
559
560
<para>
561
Allows redefining or appending fields to the request header
562
<link id="grpc_pass_request_headers">passed</link> to the gRPC server.
563
The <value>value</value> can contain text, variables, and their combinations.
564
These directives are inherited from the previous configuration level
565
if and only if there are no <literal>grpc_set_header</literal> directives
566
defined on the current level.
567
</para>
568
569
<para>
570
If the value of a header field is an empty string then this
571
field will not be passed to a gRPC server:
572
<example>
573
grpc_set_header Accept-Encoding "";
574
</example>
575
</para>
576
577
</directive>
578
579
580
<directive name="grpc_socket_keepalive">
581
<syntax><literal>on</literal> | <literal>off</literal></syntax>
582
<default>off</default>
583
<context>http</context>
584
<context>server</context>
585
<context>location</context>
586
<appeared-in>1.15.6</appeared-in>
587
588
<para>
589
Configures the “TCP keepalive” behavior
590
for outgoing connections to a gRPC server.
591
By default, the operating system’s settings are in effect for the socket.
592
If the directive is set to the value “<literal>on</literal>”, the
593
<c-def>SO_KEEPALIVE</c-def> socket option is turned on for the socket.
594
</para>
595
596
</directive>
597
598
599
<directive name="grpc_ssl_certificate">
600
<syntax><value>file</value></syntax>
601
<default/>
602
<context>http</context>
603
<context>server</context>
604
<context>location</context>
605
606
<para>
607
Specifies a <value>file</value> with the certificate in the PEM format
608
used for authentication to a gRPC SSL server.
609
</para>
610
611
<para id="grpc_ssl_certificate_variables">
612
Since version 1.21.0, variables can be used in the <value>file</value> name.
613
</para>
614
615
</directive>
616
617
618
<directive name="grpc_ssl_certificate_cache">
619
<syntax><literal>off</literal></syntax>
620
<syntax>
621
<literal>max</literal>=<value>N</value>
622
[<literal>inactive</literal>=<value>time</value>]
623
[<literal>valid</literal>=<value>time</value>]</syntax>
624
<default>off</default>
625
<context>http</context>
626
<context>server</context>
627
<context>location</context>
628
<appeared-in>1.27.4</appeared-in>
629
630
<para>
631
Defines a cache that stores
632
<link id="grpc_ssl_certificate">SSL certificates</link> and
633
<link id="grpc_ssl_certificate_key">secret keys</link>
634
specified with <link id="grpc_ssl_certificate_key_variables">variables</link>.
635
</para>
636
637
<para>
638
The directive has the following parameters:
639
<list type="tag">
640
641
<tag-name id="grpc_ssl_certificate_cache_max">
642
<literal>max</literal>
643
</tag-name>
644
<tag-desc>
645
sets the maximum number of elements in the cache;
646
on cache overflow the least recently used (LRU) elements are removed;
647
</tag-desc>
648
649
<tag-name id="grpc_ssl_certificate_cache_inactive">
650
<literal>inactive</literal>
651
</tag-name>
652
<tag-desc>
653
defines a time after which an element is removed from the cache
654
if it has not been accessed during this time;
655
by default, it is 10 seconds;
656
</tag-desc>
657
658
<tag-name id="grpc_ssl_certificate_cache_valid">
659
<literal>valid</literal>
660
</tag-name>
661
<tag-desc>
662
defines a time during which
663
an element in the cache is considered valid
664
and can be reused;
665
by default, it is 60 seconds.
666
Certificates that exceed this time will be reloaded or revalidated;
667
</tag-desc>
668
669
<tag-name id="grpc_ssl_certificate_cache_off">
670
<literal>off</literal>
671
</tag-name>
672
<tag-desc>
673
disables the cache.
674
</tag-desc>
675
676
</list>
677
</para>
678
679
<para>
680
Example:
681
<example>
682
grpc_ssl_certificate $grpc_ssl_server_name.crt;
683
grpc_ssl_certificate_key $grpc_ssl_server_name.key;
684
grpc_ssl_certificate_cache max=1000 inactive=20s valid=1m;
685
</example>
686
</para>
687
688
</directive>
689
690
691
<directive name="grpc_ssl_certificate_key">
692
<syntax><value>file</value></syntax>
693
<default/>
694
<context>http</context>
695
<context>server</context>
696
<context>location</context>
697
698
<para>
699
Specifies a <value>file</value> with the secret key in the PEM format
700
used for authentication to a gRPC SSL server.
701
</para>
702
703
<para>
704
The value
705
<literal>engine</literal>:<value>name</value>:<value>id</value>
706
can be specified instead of the <value>file</value>,
707
which loads a secret key with a specified <value>id</value>
708
from the OpenSSL engine <value>name</value>.
709
</para>
710
711
<para>
712
The value
713
<literal>store</literal>:<value>scheme</value>:<value>id</value>
714
can be specified instead of the <value>file</value> (1.29.0),
715
which is used to load a secret key with a specified <value>id</value>
716
and OpenSSL provider registered URI <value>scheme</value>, such as
717
<link url="https://datatracker.ietf.org/doc/html/rfc7512"><literal>pkcs11</literal></link>.
718
</para>
719
720
<para id="grpc_ssl_certificate_key_variables">
721
Since version 1.21.0, variables can be used in the <value>file</value> name.
722
</para>
723
724
</directive>
725
726
727
<directive name="grpc_ssl_ciphers">
728
<syntax><value>ciphers</value></syntax>
729
<default>DEFAULT</default>
730
<context>http</context>
731
<context>server</context>
732
<context>location</context>
733
734
<para>
735
Specifies the enabled ciphers for requests to a gRPC SSL server.
736
The ciphers are specified in the format understood by the OpenSSL library.
737
</para>
738
739
<para>
740
The full list can be viewed using the
741
<command>openssl ciphers</command>” command.
742
</para>
743
744
</directive>
745
746
747
<directive name="grpc_ssl_conf_command">
748
<syntax><value>name</value> <value>value</value></syntax>
749
<default/>
750
<context>http</context>
751
<context>server</context>
752
<context>location</context>
753
<appeared-in>1.19.4</appeared-in>
754
755
<para>
756
Sets arbitrary OpenSSL configuration
757
<link url="https://www.openssl.org/docs/man1.1.1/man3/SSL_CONF_cmd.html">commands</link>
758
when establishing a connection with the gRPC SSL server.
759
<note>
760
The directive is supported when using OpenSSL 1.0.2 or higher.
761
</note>
762
</para>
763
764
<para>
765
Several <literal>grpc_ssl_conf_command</literal> directives
766
can be specified on the same level.
767
These directives are inherited from the previous configuration level
768
if and only if there are
769
no <literal>grpc_ssl_conf_command</literal> directives
770
defined on the current level.
771
</para>
772
773
<para>
774
<note>
775
Note that configuring OpenSSL directly
776
might result in unexpected behavior.
777
</note>
778
</para>
779
780
</directive>
781
782
783
<directive name="grpc_ssl_crl">
784
<syntax><value>file</value></syntax>
785
<default/>
786
<context>http</context>
787
<context>server</context>
788
<context>location</context>
789
790
<para>
791
Specifies a <value>file</value> with revoked certificates (CRL)
792
in the PEM format used to <link id="grpc_ssl_verify">verify</link>
793
the certificate of the gRPC SSL server.
794
When using intermediate certificates, their CRLs should be
795
specified in the same file.
796
</para>
797
798
</directive>
799
800
801
<directive name="grpc_ssl_key_log">
802
<syntax>path</syntax>
803
<default/>
804
<context>http</context>
805
<context>server</context>
806
<context>location</context>
807
<appeared-in>1.27.2</appeared-in>
808
809
<para>
810
Enables logging of gRPC SSL server connection SSL keys
811
and specifies the path to the key log file.
812
Keys are logged in the
813
<link url="https://datatracker.ietf.org/doc/html/draft-ietf-tls-keylogfile">SSLKEYLOGFILE</link>
814
format compatible with Wireshark.
815
</para>
816
817
<para>
818
<note>
819
This directive is available as part of our
820
<commercial_version>commercial subscription</commercial_version>.
821
</note>
822
</para>
823
824
</directive>
825
826
827
<directive name="grpc_ssl_name">
828
<syntax><value>name</value></syntax>
829
<default>host from grpc_pass</default>
830
<context>http</context>
831
<context>server</context>
832
<context>location</context>
833
834
<para>
835
Allows overriding the server name used to
836
<link id="grpc_ssl_verify">verify</link>
837
the certificate of the gRPC SSL server and to be
838
<link id="grpc_ssl_server_name">passed through SNI</link>
839
when establishing a connection with the gRPC SSL server.
840
</para>
841
842
<para>
843
By default, the host part from <link id="grpc_pass"/> is used.
844
</para>
845
846
</directive>
847
848
849
<directive name="grpc_ssl_password_file">
850
<syntax><value>file</value></syntax>
851
<default/>
852
<context>http</context>
853
<context>server</context>
854
<context>location</context>
855
856
<para>
857
Specifies a <value>file</value> with passphrases for
858
<link id="grpc_ssl_certificate_key">secret keys</link>
859
where each passphrase is specified on a separate line.
860
Passphrases are tried in turn when loading the key.
861
</para>
862
863
</directive>
864
865
866
<directive name="grpc_ssl_protocols">
867
<syntax>
868
[<literal>SSLv2</literal>]
869
[<literal>SSLv3</literal>]
870
[<literal>TLSv1</literal>]
871
[<literal>TLSv1.1</literal>]
872
[<literal>TLSv1.2</literal>]
873
[<literal>TLSv1.3</literal>]</syntax>
874
<default>TLSv1.2 TLSv1.3</default>
875
<context>http</context>
876
<context>server</context>
877
<context>location</context>
878
879
<para>
880
Enables the specified protocols for requests to a gRPC SSL server.
881
</para>
882
883
<para>
884
<note>
885
The <literal>TLSv1.3</literal> parameter is used by default
886
since 1.23.4.
887
</note>
888
</para>
889
890
</directive>
891
892
893
<directive name="grpc_ssl_server_name">
894
<syntax><literal>on</literal> | <literal>off</literal></syntax>
895
<default>off</default>
896
<context>http</context>
897
<context>server</context>
898
<context>location</context>
899
900
<para>
901
Enables or disables passing of the server name through
902
<link url="http://en.wikipedia.org/wiki/Server_Name_Indication">TLS
903
Server Name Indication extension</link> (SNI, RFC 6066)
904
when establishing a connection with the gRPC SSL server.
905
</para>
906
907
</directive>
908
909
910
<directive name="grpc_ssl_session_reuse">
911
<syntax><literal>on</literal> | <literal>off</literal></syntax>
912
<default>on</default>
913
<context>http</context>
914
<context>server</context>
915
<context>location</context>
916
917
<para>
918
Determines whether SSL sessions can be reused when working with
919
the gRPC server.
920
If the errors
921
<literal>digest check failed</literal>
922
appear in the logs, try disabling session reuse.
923
</para>
924
925
</directive>
926
927
928
<directive name="grpc_ssl_trusted_certificate">
929
<syntax><value>file</value></syntax>
930
<default/>
931
<context>http</context>
932
<context>server</context>
933
<context>location</context>
934
935
<para>
936
Specifies a <value>file</value> with trusted CA certificates in the PEM format
937
used to <link id="grpc_ssl_verify">verify</link>
938
the certificate of the gRPC SSL server.
939
</para>
940
941
</directive>
942
943
944
<directive name="grpc_ssl_verify">
945
<syntax><literal>on</literal> | <literal>off</literal></syntax>
946
<default>off</default>
947
<context>http</context>
948
<context>server</context>
949
<context>location</context>
950
951
<para>
952
Enables or disables verification of the gRPC SSL server certificate.
953
</para>
954
955
</directive>
956
957
958
<directive name="grpc_ssl_verify_depth">
959
<syntax><value>number</value></syntax>
960
<default>1</default>
961
<context>http</context>
962
<context>server</context>
963
<context>location</context>
964
965
<para>
966
Sets the verification depth in the gRPC SSL server certificates chain.
967
</para>
968
969
</directive>
970
971
</section>
972
973
</module>
974
975