Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
nginx
GitHub Repository: nginx/nginx.org
Path: blob/main/xml/en/docs/configure.xml
1 views
1
<!--
2
Copyright (C) Igor Sysoev
3
Copyright (C) Nginx, Inc.
4
-->
5
6
<!DOCTYPE article SYSTEM "../../../dtd/article.dtd">
7
8
<article name="Building nginx from Sources"
9
link="/en/docs/configure.html"
10
lang="en"
11
rev="26">
12
13
<section>
14
15
<para>
16
The build is configured using the <command>configure</command> command.
17
It defines various aspects of the system, including the methods nginx
18
is allowed to use for connection processing.
19
At the end it creates a <path>Makefile</path>.
20
</para>
21
22
<para>
23
The <command>configure</command> command supports the following parameters:
24
</para>
25
26
<para>
27
<list type="tag">
28
29
<tag-name>
30
<literal>--help</literal>
31
</tag-name>
32
<tag-desc>
33
prints a help message.
34
</tag-desc>
35
36
</list>
37
</para>
38
39
<para>
40
<list type="tag">
41
42
<tag-name id="prefix">
43
<literal>--prefix=<value>path</value></literal>
44
</tag-name>
45
<tag-desc>
46
defines a directory that will keep server files.
47
This same directory will also be used for all relative paths set by
48
<command>configure</command> (except for paths to libraries sources)
49
and in the <path>nginx.conf</path> configuration file.
50
It is set to the <path>/usr/local/nginx</path> directory by default.
51
</tag-desc>
52
53
<tag-name>
54
<literal>--sbin-path=<value>path</value></literal>
55
</tag-name>
56
<tag-desc>
57
sets the name of an nginx executable file.
58
This name is used only during installation.
59
By default the file is named
60
<path><value>prefix</value>/sbin/nginx</path>.
61
</tag-desc>
62
63
<tag-name>
64
<literal>--modules-path=<value>path</value></literal>
65
</tag-name>
66
<tag-desc>
67
defines a directory where nginx dynamic modules will be installed.
68
By default the <path><value>prefix</value>/modules</path> directory is used.
69
</tag-desc>
70
71
<tag-name id="conf_path">
72
<literal>--conf-path=<value>path</value></literal>
73
</tag-name>
74
<tag-desc>
75
sets the name of an <path>nginx.conf</path> configuration file.
76
If needs be, nginx can always be started with a different configuration file,
77
by specifying it in the command-line parameter
78
<nobr><literal>-c <value>file</value></literal></nobr>.
79
By default the file is named
80
<path><value>prefix</value>/conf/nginx.conf</path>.
81
</tag-desc>
82
83
<tag-name>
84
<literal>--error-log-path=<value>path</value></literal>
85
</tag-name>
86
<tag-desc>
87
sets the name of the primary error, warnings, and diagnostic file.
88
After installation, the file name can always be changed in the
89
<path>nginx.conf</path> configuration file using the
90
<link doc="ngx_core_module.xml" id="error_log"/> directive.
91
By default the file is named
92
<path><value>prefix</value>/logs/error.log</path>.
93
</tag-desc>
94
95
<tag-name>
96
<literal>--pid-path=<value>path</value></literal>
97
</tag-name>
98
<tag-desc>
99
sets the name of an <path>nginx.pid</path> file
100
that will store the process ID of the main process.
101
After installation, the file name can always be changed in the
102
<path>nginx.conf</path> configuration file using the
103
<link doc="ngx_core_module.xml" id="pid"/> directive.
104
By default the file is named
105
<path><value>prefix</value>/logs/nginx.pid</path>.
106
</tag-desc>
107
108
<tag-name>
109
<literal>--lock-path=<value>path</value></literal>
110
</tag-name>
111
<tag-desc>
112
sets a prefix for the names of lock files.
113
After installation, the value can always be changed in the
114
<path>nginx.conf</path> configuration file using the
115
<link doc="ngx_core_module.xml" id="lock_file"/> directive.
116
By default the value is
117
<path><value>prefix</value>/logs/nginx.lock</path>.
118
</tag-desc>
119
120
</list>
121
</para>
122
123
<para>
124
<list type="tag">
125
126
<tag-name>
127
<literal>--user=<value>name</value></literal>
128
</tag-name>
129
<tag-desc>
130
sets the name of an unprivileged user whose credentials will be used
131
by worker processes.
132
After installation, the name can always be changed in the
133
<path>nginx.conf</path> configuration file using the
134
<link doc="ngx_core_module.xml" id="user"/> directive.
135
The default user name is nobody.
136
</tag-desc>
137
138
<tag-name>
139
<literal>--group=<value>name</value></literal>
140
</tag-name>
141
<tag-desc>
142
sets the name of a group whose credentials will be used
143
by worker processes.
144
After installation, the name can always be changed in the
145
<path>nginx.conf</path> configuration file using the
146
<link doc="ngx_core_module.xml" id="user"/> directive.
147
By default, a group name is set to the name of an unprivileged user.
148
</tag-desc>
149
150
</list>
151
</para>
152
153
<para>
154
<list type="tag">
155
156
<tag-name id="build">
157
<literal>--build=<value>name</value></literal>
158
</tag-name>
159
<tag-desc>
160
sets an optional nginx build name.
161
</tag-desc>
162
163
<tag-name>
164
<literal>--builddir=<value>path</value></literal>
165
</tag-name>
166
<tag-desc>
167
sets a build directory.
168
</tag-desc>
169
170
</list>
171
</para>
172
173
<para>
174
<list type="tag">
175
176
<tag-name>
177
<literal>--with-select_module</literal><br/>
178
<literal>--without-select_module</literal>
179
</tag-name>
180
<tag-desc>
181
enables or disables building a module that allows the server to work
182
with the <c-func>select</c-func> method.
183
This module is built automatically if the platform does not appear
184
to support more appropriate methods such as kqueue, epoll, or /dev/poll.
185
</tag-desc>
186
187
<tag-name>
188
<literal>--with-poll_module</literal><br/>
189
<literal>--without-poll_module</literal>
190
</tag-name>
191
<tag-desc>
192
enables or disables building a module that allows the server to work
193
with the <c-func>poll</c-func> method.
194
This module is built automatically if the platform does not appear
195
to support more appropriate methods such as kqueue, epoll, or /dev/poll.
196
</tag-desc>
197
198
<tag-name>
199
<literal>--with-threads</literal>
200
</tag-name>
201
<tag-desc>
202
enables the use of
203
<link doc="ngx_core_module.xml" id="thread_pool">thread pools</link>.
204
</tag-desc>
205
206
<tag-name>
207
<literal>--with-file-aio</literal>
208
</tag-name>
209
<tag-desc>
210
enables the use of
211
<link doc="http/ngx_http_core_module.xml" id="aio">asynchronous file I/O</link>
212
(AIO) on FreeBSD and Linux.
213
</tag-desc>
214
215
</list>
216
</para>
217
218
<para>
219
<list type="tag">
220
221
<tag-name>
222
<literal>--with-http_ssl_module</literal>
223
</tag-name>
224
<tag-desc>
225
enables building a module that adds the
226
<link doc="http/ngx_http_ssl_module.xml">HTTPS protocol support</link>
227
to an HTTP server.
228
This module is not built by default.
229
The OpenSSL library is required to build and run this module.
230
</tag-desc>
231
232
<tag-name>
233
<literal>--with-http_v2_module</literal>
234
</tag-name>
235
<tag-desc>
236
enables building a module that provides support for
237
<link doc="http/ngx_http_v2_module.xml">HTTP/2</link>.
238
This module is not built by default.
239
</tag-desc>
240
241
<tag-name>
242
<literal>--with-http_v3_module</literal>
243
</tag-name>
244
<tag-desc>
245
enables building a module that provides support for
246
<link doc="http/ngx_http_v3_module.xml">HTTP/3</link>.
247
This module is not built by default.
248
The OpenSSL library that provides HTTP/3 support
249
is required to build and run this module.
250
</tag-desc>
251
252
<tag-name>
253
<literal>--with-http_realip_module</literal>
254
</tag-name>
255
<tag-desc>
256
enables building the
257
<link doc="http/ngx_http_realip_module.xml">ngx_http_realip_module</link>
258
module that changes the client address to the address
259
sent in the specified header field.
260
This module is not built by default.
261
</tag-desc>
262
263
<tag-name>
264
<literal>--with-http_addition_module</literal>
265
</tag-name>
266
<tag-desc>
267
enables building the
268
<link doc="http/ngx_http_addition_module.xml">ngx_http_addition_module</link>
269
module that adds text before and after a response.
270
This module is not built by default.
271
</tag-desc>
272
273
<tag-name>
274
<literal>--with-http_xslt_module</literal><br/>
275
<literal>--with-http_xslt_module=dynamic</literal>
276
</tag-name>
277
<tag-desc>
278
enables building the
279
<link doc="http/ngx_http_xslt_module.xml">ngx_http_xslt_module</link>
280
module that transforms XML responses using one or more XSLT stylesheets.
281
This module is not built by default.
282
The <link url="http://xmlsoft.org">libxml2</link> and
283
<link url="http://xmlsoft.org/XSLT/">libxslt</link> libraries
284
are required to build and run this module.
285
</tag-desc>
286
287
<tag-name>
288
<literal>--with-http_image_filter_module</literal><br/>
289
<literal>--with-http_image_filter_module=dynamic</literal>
290
</tag-name>
291
<tag-desc>
292
enables building the
293
<link doc="http/ngx_http_image_filter_module.xml">ngx_http_image_filter_module</link>
294
module that transforms images in JPEG, GIF, PNG, and WebP formats.
295
This module is not built by default.
296
</tag-desc>
297
298
<tag-name>
299
<literal>--with-http_geoip_module</literal><br/>
300
<literal>--with-http_geoip_module=dynamic</literal>
301
</tag-name>
302
<tag-desc>
303
enables building the
304
<link doc="http/ngx_http_geoip_module.xml">ngx_http_geoip_module</link>
305
module that creates variables depending on the client IP address
306
and the precompiled
307
<link url="http://www.maxmind.com">MaxMind</link> databases.
308
This module is not built by default.
309
</tag-desc>
310
311
<tag-name>
312
<literal>--with-http_sub_module</literal>
313
</tag-name>
314
<tag-desc>
315
enables building the
316
<link doc="http/ngx_http_sub_module.xml">ngx_http_sub_module</link>
317
module that modifies a response by replacing one specified string by another.
318
This module is not built by default.
319
</tag-desc>
320
321
<tag-name>
322
<literal>--with-http_dav_module</literal>
323
</tag-name>
324
<tag-desc>
325
enables building the
326
<link doc="http/ngx_http_dav_module.xml">ngx_http_dav_module</link>
327
module that provides file management automation via the WebDAV protocol.
328
This module is not built by default.
329
</tag-desc>
330
331
<tag-name>
332
<literal>--with-http_flv_module</literal>
333
</tag-name>
334
<tag-desc>
335
enables building the
336
<link doc="http/ngx_http_flv_module.xml">ngx_http_flv_module</link>
337
module that provides pseudo-streaming server-side support
338
for Flash Video (FLV) files.
339
This module is not built by default.
340
</tag-desc>
341
342
<tag-name>
343
<literal>--with-http_mp4_module</literal>
344
</tag-name>
345
<tag-desc>
346
enables building the
347
<link doc="http/ngx_http_mp4_module.xml">ngx_http_mp4_module</link>
348
module that provides pseudo-streaming server-side support
349
for MP4 files.
350
This module is not built by default.
351
</tag-desc>
352
353
<tag-name>
354
<literal>--with-http_gunzip_module</literal>
355
</tag-name>
356
<tag-desc>
357
enables building the
358
<link doc="http/ngx_http_gunzip_module.xml">ngx_http_gunzip_module</link>
359
module that decompresses responses
360
with “<literal>Content-Encoding: gzip</literal>
361
for clients that do not support “gzip” encoding method.
362
This module is not built by default.
363
</tag-desc>
364
365
<tag-name>
366
<literal>--with-http_gzip_static_module</literal>
367
</tag-name>
368
<tag-desc>
369
enables building the
370
<link doc="http/ngx_http_gzip_static_module.xml">ngx_http_gzip_static_module</link>
371
module that enables sending precompressed files
372
with the “<literal>.gz</literal>” filename extension instead of regular files.
373
This module is not built by default.
374
</tag-desc>
375
376
<tag-name>
377
<literal>--with-http_auth_request_module</literal>
378
</tag-name>
379
<tag-desc>
380
enables building the
381
<link doc="http/ngx_http_auth_request_module.xml">ngx_http_auth_request_module</link>
382
module that implements client authorization
383
based on the result of a subrequest.
384
This module is not built by default.
385
</tag-desc>
386
387
<tag-name>
388
<literal>--with-http_random_index_module</literal>
389
</tag-name>
390
<tag-desc>
391
enables building the
392
<link doc="http/ngx_http_random_index_module.xml">ngx_http_random_index_module</link>
393
module that processes requests
394
ending with the slash character (‘<literal>/</literal>’) and picks a random
395
file in a directory to serve as an index file.
396
This module is not built by default.
397
</tag-desc>
398
399
<tag-name>
400
<literal>--with-http_secure_link_module</literal>
401
</tag-name>
402
<tag-desc>
403
enables building the
404
<link doc="http/ngx_http_secure_link_module.xml">ngx_http_secure_link_module</link>
405
module.
406
This module is not built by default.
407
</tag-desc>
408
409
<tag-name>
410
<literal>--with-http_degradation_module</literal>
411
</tag-name>
412
<tag-desc>
413
enables building the
414
<literal>ngx_http_degradation_module</literal> module.
415
This module is not built by default.
416
</tag-desc>
417
418
<tag-name>
419
<literal>--with-http_slice_module</literal>
420
</tag-name>
421
<tag-desc>
422
enables building the
423
<link doc="http/ngx_http_slice_module.xml">ngx_http_slice_module</link>
424
module that splits a request into subrequests,
425
each returning a certain range of response.
426
The module provides more effective caching of big responses.
427
This module is not built by default.
428
</tag-desc>
429
430
<tag-name>
431
<literal>--with-http_stub_status_module</literal>
432
</tag-name>
433
<tag-desc>
434
enables building the
435
<link doc="http/ngx_http_stub_status_module.xml">ngx_http_stub_status_module</link>
436
module that provides access to basic status information.
437
This module is not built by default.
438
</tag-desc>
439
440
</list>
441
</para>
442
443
<para>
444
<list type="tag">
445
446
<tag-name>
447
<literal>--without-http_charset_module</literal>
448
</tag-name>
449
<tag-desc>
450
disables building the
451
<link doc="http/ngx_http_charset_module.xml">ngx_http_charset_module</link>
452
module that adds the specified charset to the
453
<header>Content-Type</header> response header field
454
and can additionally convert data from one charset to another.
455
</tag-desc>
456
457
<tag-name>
458
<literal>--without-http_gzip_module</literal>
459
</tag-name>
460
<tag-desc>
461
disables building a module
462
that <link doc="http/ngx_http_gzip_module.xml">compresses responses</link>
463
of an HTTP server.
464
The zlib library is required to build and run this module.
465
</tag-desc>
466
467
<tag-name>
468
<literal>--without-http_ssi_module</literal>
469
</tag-name>
470
<tag-desc>
471
disables building the
472
<link doc="http/ngx_http_ssi_module.xml">ngx_http_ssi_module</link>
473
module that processes SSI (Server Side Includes) commands in responses
474
passing through it.
475
</tag-desc>
476
477
<tag-name>
478
<literal>--without-http_userid_module</literal>
479
</tag-name>
480
<tag-desc>
481
disables building the
482
<link doc="http/ngx_http_userid_module.xml">ngx_http_userid_module</link>
483
module that sets cookies suitable for client identification.
484
</tag-desc>
485
486
<tag-name>
487
<literal>--without-http_access_module</literal>
488
</tag-name>
489
<tag-desc>
490
disables building the
491
<link doc="http/ngx_http_access_module.xml">ngx_http_access_module</link>
492
module that allows limiting access to certain client addresses.
493
</tag-desc>
494
495
<tag-name>
496
<literal>--without-http_auth_basic_module</literal>
497
</tag-name>
498
<tag-desc>
499
disables building the
500
<link doc="http/ngx_http_auth_basic_module.xml">ngx_http_auth_basic_module</link>
501
module that allows limiting access to resources by validating the user name
502
and password using the “HTTP Basic Authentication” protocol.
503
</tag-desc>
504
505
<tag-name>
506
<literal>--without-http_mirror_module</literal>
507
</tag-name>
508
<tag-desc>
509
disables building the
510
<link doc="http/ngx_http_mirror_module.xml">ngx_http_mirror_module</link>
511
module that implements mirroring of an original request
512
by creating background mirror subrequests.
513
</tag-desc>
514
515
<tag-name>
516
<literal>--without-http_autoindex_module</literal>
517
</tag-name>
518
<tag-desc>
519
disables building the
520
<link doc="http/ngx_http_autoindex_module.xml">ngx_http_autoindex_module</link>
521
module that processes requests
522
ending with the slash character (‘<literal>/</literal>’) and produces
523
a directory listing in case the
524
<link doc="http/ngx_http_index_module.xml">ngx_http_index_module</link> module
525
cannot find an index file.
526
</tag-desc>
527
528
<tag-name>
529
<literal>--without-http_geo_module</literal>
530
</tag-name>
531
<tag-desc>
532
disables building the
533
<link doc="http/ngx_http_geo_module.xml">ngx_http_geo_module</link>
534
module that creates variables
535
with values depending on the client IP address.
536
</tag-desc>
537
538
<tag-name>
539
<literal>--without-http_map_module</literal>
540
</tag-name>
541
<tag-desc>
542
disables building the
543
<link doc="http/ngx_http_map_module.xml">ngx_http_map_module</link>
544
module that creates variables
545
with values depending on values of other variables.
546
</tag-desc>
547
548
<tag-name>
549
<literal>--without-http_split_clients_module</literal>
550
</tag-name>
551
<tag-desc>
552
disables building the
553
<link doc="http/ngx_http_split_clients_module.xml">ngx_http_split_clients_module</link>
554
module that creates variables for A/B testing.
555
</tag-desc>
556
557
<tag-name>
558
<literal>--without-http_referer_module</literal>
559
</tag-name>
560
<tag-desc>
561
disables building the
562
<link doc="http/ngx_http_referer_module.xml">ngx_http_referer_module</link>
563
module that can block access to a site for requests with invalid values
564
in the <header>Referer</header> header field.
565
</tag-desc>
566
567
<tag-name>
568
<literal>--without-http_rewrite_module</literal>
569
</tag-name>
570
<tag-desc>
571
disables building a module that allows an HTTP server to
572
<link doc="http/ngx_http_rewrite_module.xml">redirect requests and change URI
573
of requests</link>.
574
The PCRE library is required to build and run this module.
575
</tag-desc>
576
577
<tag-name>
578
<literal>--without-http_proxy_module</literal>
579
</tag-name>
580
<tag-desc>
581
disables building an HTTP server
582
<link doc="http/ngx_http_proxy_module.xml">proxying module</link>.
583
<!--
584
The MD5 library is required to build and run this module.
585
-->
586
</tag-desc>
587
588
<tag-name>
589
<literal>--without-http_fastcgi_module</literal>
590
</tag-name>
591
<tag-desc>
592
disables building the
593
<link doc="http/ngx_http_fastcgi_module.xml">ngx_http_fastcgi_module</link>
594
module that passes requests to a FastCGI server.
595
</tag-desc>
596
597
<tag-name>
598
<literal>--without-http_uwsgi_module</literal>
599
</tag-name>
600
<tag-desc>
601
disables building the
602
<link doc="http/ngx_http_uwsgi_module.xml">ngx_http_uwsgi_module</link>
603
module that passes requests to a uwsgi server.
604
</tag-desc>
605
606
<tag-name>
607
<literal>--without-http_scgi_module</literal>
608
</tag-name>
609
<tag-desc>
610
disables building the
611
<link doc="http/ngx_http_scgi_module.xml">ngx_http_scgi_module</link>
612
module that passes requests to an SCGI server.
613
</tag-desc>
614
615
<tag-name>
616
<literal>--without-http_grpc_module</literal>
617
</tag-name>
618
<tag-desc>
619
disables building the
620
<link doc="http/ngx_http_grpc_module.xml">ngx_http_grpc_module</link>
621
module that passes requests to a gRPC server.
622
</tag-desc>
623
624
<tag-name>
625
<literal>--without-http_memcached_module</literal>
626
</tag-name>
627
<tag-desc>
628
disables building the
629
<link doc="http/ngx_http_memcached_module.xml">ngx_http_memcached_module</link>
630
module that obtains responses from a memcached server.
631
</tag-desc>
632
633
<tag-name>
634
<literal>--without-http_limit_conn_module</literal>
635
</tag-name>
636
<tag-desc>
637
disables building the
638
<link doc="http/ngx_http_limit_conn_module.xml">ngx_http_limit_conn_module</link>
639
module that limits the number of connections per key, for example,
640
the number of connections from a single IP address.
641
</tag-desc>
642
643
<tag-name>
644
<literal>--without-http_limit_req_module</literal>
645
</tag-name>
646
<tag-desc>
647
disables building the
648
<link doc="http/ngx_http_limit_req_module.xml">ngx_http_limit_req_module</link>
649
module that limits the request processing rate per key, for example,
650
the processing rate of requests coming from a single IP address.
651
</tag-desc>
652
653
<tag-name>
654
<literal>--without-http_empty_gif_module</literal>
655
</tag-name>
656
<tag-desc>
657
disables building a module that
658
<link doc="http/ngx_http_empty_gif_module.xml">emits single-pixel
659
transparent GIF</link>.
660
</tag-desc>
661
662
<tag-name>
663
<literal>--without-http_browser_module</literal>
664
</tag-name>
665
<tag-desc>
666
disables building the
667
<link doc="http/ngx_http_browser_module.xml">ngx_http_browser_module</link>
668
module that creates variables whose values depend on the value of the
669
<header>User-Agent</header> request header field.
670
</tag-desc>
671
672
<tag-name>
673
<literal>--without-http_upstream_hash_module</literal>
674
</tag-name>
675
<tag-desc>
676
disables building a module that implements the
677
<link doc="http/ngx_http_upstream_module.xml" id="hash"/>
678
load balancing method.
679
</tag-desc>
680
681
<tag-name>
682
<literal>--without-http_upstream_ip_hash_module</literal>
683
</tag-name>
684
<tag-desc>
685
disables building a module that implements the
686
<link doc="http/ngx_http_upstream_module.xml" id="ip_hash"/>
687
load balancing method.
688
</tag-desc>
689
690
<tag-name>
691
<literal>--without-http_upstream_least_conn_module</literal>
692
</tag-name>
693
<tag-desc>
694
disables building a module that implements the
695
<link doc="http/ngx_http_upstream_module.xml" id="least_conn"/>
696
load balancing method.
697
</tag-desc>
698
699
<tag-name>
700
<literal>--without-http_upstream_least_time_module</literal>
701
</tag-name>
702
<tag-desc>
703
disables building a module that implements the
704
<link doc="http/ngx_http_upstream_module.xml" id="least_time"/>
705
load balancing method.
706
</tag-desc>
707
708
<tag-name>
709
<literal>--without-http_upstream_random_module</literal>
710
</tag-name>
711
<tag-desc>
712
disables building a module that implements the
713
<link doc="http/ngx_http_upstream_module.xml" id="random"/>
714
load balancing method.
715
</tag-desc>
716
717
<tag-name>
718
<literal>--without-http_upstream_keepalive_module</literal>
719
</tag-name>
720
<tag-desc>
721
disables building a module that provides
722
<link doc="http/ngx_http_upstream_module.xml" id="keepalive">caching of
723
connections</link> to upstream servers.
724
</tag-desc>
725
726
<tag-name>
727
<literal>--without-http_upstream_zone_module</literal>
728
</tag-name>
729
<tag-desc>
730
disables building a module that makes it possible to store run-time state
731
of an upstream group in a shared memory
732
<link doc="http/ngx_http_upstream_module.xml" id="zone"/>.
733
</tag-desc>
734
735
<tag-name>
736
<literal>--without-http_upstream_sticky_module</literal>
737
</tag-name>
738
<tag-desc>
739
disables building a module that provides
740
<link doc="http/ngx_http_upstream_module.xml" id="sticky">session
741
affinity</link> to upstream servers.
742
</tag-desc>
743
744
</list>
745
</para>
746
747
<para>
748
<list type="tag">
749
750
<tag-name>
751
<literal>--with-http_perl_module</literal><br/>
752
<literal>--with-http_perl_module=dynamic</literal>
753
</tag-name>
754
<tag-desc>
755
enables building the
756
<link doc="http/ngx_http_perl_module.xml">embedded Perl module</link>.
757
This module is not built by default.
758
</tag-desc>
759
760
<tag-name>
761
<literal>--with-perl_modules_path=<value>path</value></literal>
762
</tag-name>
763
<tag-desc>
764
defines a directory that will keep Perl modules.
765
</tag-desc>
766
767
<tag-name>
768
<literal>--with-perl=<value>path</value></literal>
769
</tag-name>
770
<tag-desc>
771
sets the name of the Perl binary.
772
</tag-desc>
773
774
</list>
775
</para>
776
777
<para>
778
<list type="tag">
779
780
<tag-name>
781
<literal>--http-log-path=<value>path</value></literal>
782
</tag-name>
783
<tag-desc>
784
sets the name of the primary request log file of the HTTP server.
785
After installation, the file name can always be changed in the
786
<path>nginx.conf</path> configuration file using the
787
<link doc="http/ngx_http_log_module.xml" id="access_log"/> directive.
788
By default the file is named
789
<path><value>prefix</value>/logs/access.log</path>.
790
</tag-desc>
791
792
<tag-name>
793
<literal>--http-client-body-temp-path=<value>path</value></literal>
794
</tag-name>
795
<tag-desc>
796
defines a directory for storing temporary files
797
that hold client request bodies.
798
After installation, the directory can always be changed in the
799
<path>nginx.conf</path> configuration file using the
800
<link doc="http/ngx_http_core_module.xml" id="client_body_temp_path"/>
801
directive.
802
By default the directory is named
803
<path><value>prefix</value>/client_body_temp</path>.
804
</tag-desc>
805
806
<tag-name>
807
<literal>--http-proxy-temp-path=<value>path</value></literal>
808
</tag-name>
809
<tag-desc>
810
defines a directory for storing temporary files
811
with data received from proxied servers.
812
After installation, the directory can always be changed in the
813
<path>nginx.conf</path> configuration file using the
814
<link doc="http/ngx_http_proxy_module.xml" id="proxy_temp_path"/>
815
directive.
816
By default the directory is named
817
<path><value>prefix</value>/proxy_temp</path>.
818
</tag-desc>
819
820
<tag-name>
821
<literal>--http-fastcgi-temp-path=<value>path</value></literal>
822
</tag-name>
823
<tag-desc>
824
defines a directory for storing temporary files
825
with data received from FastCGI servers.
826
After installation, the directory can always be changed in the
827
<path>nginx.conf</path> configuration file using the
828
<link doc="http/ngx_http_fastcgi_module.xml" id="fastcgi_temp_path"/>
829
directive.
830
By default the directory is named
831
<path><value>prefix</value>/fastcgi_temp</path>.
832
</tag-desc>
833
834
<tag-name>
835
<literal>--http-uwsgi-temp-path=<value>path</value></literal>
836
</tag-name>
837
<tag-desc>
838
defines a directory for storing temporary files
839
with data received from uwsgi servers.
840
After installation, the directory can always be changed in the
841
<path>nginx.conf</path> configuration file using the
842
<link doc="http/ngx_http_uwsgi_module.xml" id="uwsgi_temp_path"/>
843
directive.
844
By default the directory is named
845
<path><value>prefix</value>/uwsgi_temp</path>.
846
</tag-desc>
847
848
<tag-name>
849
<literal>--http-scgi-temp-path=<value>path</value></literal>
850
</tag-name>
851
<tag-desc>
852
defines a directory for storing temporary files
853
with data received from SCGI servers.
854
After installation, the directory can always be changed in the
855
<path>nginx.conf</path> configuration file using the
856
<link doc="http/ngx_http_scgi_module.xml" id="scgi_temp_path"/>
857
directive.
858
By default the directory is named
859
<path><value>prefix</value>/scgi_temp</path>.
860
</tag-desc>
861
862
</list>
863
</para>
864
865
<para>
866
<list type="tag">
867
868
<tag-name>
869
<literal>--without-http</literal>
870
</tag-name>
871
<tag-desc>
872
disables the <link doc="http/ngx_http_core_module.xml">HTTP</link> server.
873
</tag-desc>
874
875
<tag-name>
876
<literal>--without-http-cache</literal>
877
</tag-name>
878
<tag-desc>
879
disables HTTP cache.
880
</tag-desc>
881
882
</list>
883
</para>
884
885
<para>
886
<list type="tag">
887
888
<tag-name>
889
<literal>--with-mail</literal><br/>
890
<literal>--with-mail=dynamic</literal>
891
</tag-name>
892
<tag-desc>
893
enables POP3/IMAP4/SMTP
894
<link doc="mail/ngx_mail_core_module.xml">mail proxy</link> server.
895
</tag-desc>
896
897
<tag-name>
898
<literal>--with-mail_ssl_module</literal>
899
</tag-name>
900
<tag-desc>
901
enables building a module that adds the
902
<link doc="mail/ngx_mail_ssl_module.xml">SSL/TLS protocol support</link>
903
to the mail proxy server.
904
This module is not built by default.
905
The OpenSSL library is required to build and run this module.
906
</tag-desc>
907
908
<tag-name>
909
<literal>--without-mail_pop3_module</literal>
910
</tag-name>
911
<tag-desc>
912
disables the <link doc="mail/ngx_mail_pop3_module.xml">POP3</link> protocol
913
in mail proxy server.
914
</tag-desc>
915
916
<tag-name>
917
<literal>--without-mail_imap_module</literal>
918
</tag-name>
919
<tag-desc>
920
disables the <link doc="mail/ngx_mail_imap_module.xml">IMAP</link> protocol
921
in mail proxy server.
922
</tag-desc>
923
924
<tag-name>
925
<literal>--without-mail_smtp_module</literal>
926
</tag-name>
927
<tag-desc>
928
disables the <link doc="mail/ngx_mail_smtp_module.xml">SMTP</link> protocol
929
in mail proxy server.
930
</tag-desc>
931
932
</list>
933
</para>
934
935
<para>
936
<list type="tag">
937
938
<tag-name>
939
<literal>--with-stream</literal><br/>
940
<literal>--with-stream=dynamic</literal>
941
</tag-name>
942
<tag-desc>
943
enables building the
944
<link doc="stream/ngx_stream_core_module.xml">stream module</link>
945
for generic TCP/UDP proxying and load balancing.
946
This module is not built by default.
947
</tag-desc>
948
949
<tag-name>
950
<literal>--with-stream_ssl_module</literal>
951
</tag-name>
952
<tag-desc>
953
enables building a module that adds the
954
<link doc="stream/ngx_stream_ssl_module.xml">SSL/TLS protocol support</link>
955
to the stream module.
956
This module is not built by default.
957
The OpenSSL library is required to build and run this module.
958
</tag-desc>
959
960
<tag-name>
961
<literal>--with-stream_realip_module</literal>
962
</tag-name>
963
<tag-desc>
964
enables building the
965
<link doc="stream/ngx_stream_realip_module.xml">ngx_stream_realip_module</link>
966
module that changes the client address to the address
967
sent in the PROXY protocol header.
968
This module is not built by default.
969
</tag-desc>
970
971
<tag-name>
972
<literal>--with-stream_geoip_module</literal><br/>
973
<literal>--with-stream_geoip_module=dynamic</literal>
974
</tag-name>
975
<tag-desc>
976
enables building the
977
<link doc="stream/ngx_stream_geoip_module.xml">ngx_stream_geoip_module</link>
978
module that creates variables depending on the client IP address
979
and the precompiled
980
<link url="http://www.maxmind.com">MaxMind</link> databases.
981
This module is not built by default.
982
</tag-desc>
983
984
<tag-name>
985
<literal>--with-stream_ssl_preread_module</literal>
986
</tag-name>
987
<tag-desc>
988
enables building the
989
<link doc="stream/ngx_stream_ssl_preread_module.xml">ngx_stream_ssl_preread_module</link>
990
module that allows extracting information from the
991
<link url="https://datatracker.ietf.org/doc/html/rfc5246#section-7.4.1.2">ClientHello</link>
992
message without terminating SSL/TLS.
993
This module is not built by default.
994
</tag-desc>
995
996
<tag-name>
997
<literal>--without-stream_limit_conn_module</literal>
998
</tag-name>
999
<tag-desc>
1000
disables building the
1001
<link doc="stream/ngx_stream_limit_conn_module.xml">ngx_stream_limit_conn_module</link>
1002
module that limits the number of connections per key, for example,
1003
the number of connections from a single IP address.
1004
</tag-desc>
1005
1006
<tag-name>
1007
<literal>--without-stream_access_module</literal>
1008
</tag-name>
1009
<tag-desc>
1010
disables building the
1011
<link doc="stream/ngx_stream_access_module.xml">ngx_stream_access_module</link>
1012
module that allows limiting access to certain client addresses.
1013
</tag-desc>
1014
1015
<tag-name>
1016
<literal>--without-stream_geo_module</literal>
1017
</tag-name>
1018
<tag-desc>
1019
disables building the
1020
<link doc="stream/ngx_stream_geo_module.xml">ngx_stream_geo_module</link>
1021
module that creates variables
1022
with values depending on the client IP address.
1023
</tag-desc>
1024
1025
<tag-name>
1026
<literal>--without-stream_map_module</literal>
1027
</tag-name>
1028
<tag-desc>
1029
disables building the
1030
<link doc="stream/ngx_stream_map_module.xml">ngx_stream_map_module</link>
1031
module that creates variables
1032
with values depending on values of other variables.
1033
</tag-desc>
1034
1035
<tag-name>
1036
<literal>--without-stream_split_clients_module</literal>
1037
</tag-name>
1038
<tag-desc>
1039
disables building the
1040
<link doc="stream/ngx_stream_split_clients_module.xml">ngx_stream_split_clients_module</link>
1041
module that creates variables for A/B testing.
1042
</tag-desc>
1043
1044
<tag-name>
1045
<literal>--without-stream_return_module</literal>
1046
</tag-name>
1047
<tag-desc>
1048
disables building the
1049
<link doc="stream/ngx_stream_return_module.xml">ngx_stream_return_module</link>
1050
module that sends some specified value to the client
1051
and then closes the connection.
1052
</tag-desc>
1053
1054
<tag-name>
1055
<literal>--without-stream_pass_module</literal>
1056
</tag-name>
1057
<tag-desc>
1058
disables building the
1059
<link doc="stream/ngx_stream_pass_module.xml">ngx_stream_pass_module</link>
1060
module that passes accepted connections to other listening sockets.
1061
</tag-desc>
1062
1063
<tag-name>
1064
<literal>--without-stream_set_module</literal>
1065
</tag-name>
1066
<tag-desc>
1067
disables building the
1068
<link doc="stream/ngx_stream_set_module.xml">ngx_stream_set_module</link>
1069
module that sets a value for a variable.
1070
</tag-desc>
1071
1072
<tag-name>
1073
<literal>--without-stream_upstream_hash_module</literal>
1074
</tag-name>
1075
<tag-desc>
1076
disables building a module that implements the
1077
<link doc="stream/ngx_stream_upstream_module.xml" id="hash"/>
1078
load balancing method.
1079
</tag-desc>
1080
1081
<tag-name>
1082
<literal>--without-stream_upstream_least_conn_module</literal>
1083
</tag-name>
1084
<tag-desc>
1085
disables building a module that implements the
1086
<link doc="stream/ngx_stream_upstream_module.xml" id="least_conn"/>
1087
load balancing method.
1088
</tag-desc>
1089
1090
<tag-name>
1091
<literal>--without-stream_upstream_least_time_module</literal>
1092
</tag-name>
1093
<tag-desc>
1094
disables building a module that implements the
1095
<link doc="stream/ngx_stream_upstream_module.xml" id="least_time"/>
1096
load balancing method.
1097
</tag-desc>
1098
1099
<tag-name>
1100
<literal>--without-stream_upstream_random_module</literal>
1101
</tag-name>
1102
<tag-desc>
1103
disables building a module that implements the
1104
<link doc="stream/ngx_stream_upstream_module.xml" id="random"/>
1105
load balancing method.
1106
</tag-desc>
1107
1108
<tag-name>
1109
<literal>--without-stream_upstream_zone_module</literal>
1110
</tag-name>
1111
<tag-desc>
1112
disables building a module that makes it possible to store run-time state
1113
of an upstream group in a shared memory
1114
<link doc="stream/ngx_stream_upstream_module.xml" id="zone"/>.
1115
</tag-desc>
1116
1117
</list>
1118
</para>
1119
1120
<para>
1121
<list type="tag">
1122
1123
<tag-name>
1124
<literal>--with-google_perftools_module</literal>
1125
</tag-name>
1126
<tag-desc>
1127
enables building the
1128
<link doc="ngx_google_perftools_module.xml">ngx_google_perftools_module</link>
1129
module that enables profiling of nginx worker processes using
1130
<link url="https://github.com/gperftools/gperftools">Google Performance Tools</link>.
1131
The module is intended for nginx developers and is not built by default.
1132
</tag-desc>
1133
1134
<tag-name>
1135
<literal>--with-cpp_test_module</literal>
1136
</tag-name>
1137
<tag-desc>
1138
enables building the
1139
<literal>ngx_cpp_test_module</literal> module.
1140
</tag-desc>
1141
1142
</list>
1143
</para>
1144
1145
<para>
1146
<list type="tag">
1147
1148
<tag-name>
1149
<literal>--add-module=<value>path</value></literal>
1150
</tag-name>
1151
<tag-desc>
1152
enables an external module.
1153
</tag-desc>
1154
1155
<tag-name>
1156
<literal>--add-dynamic-module=<value>path</value></literal>
1157
</tag-name>
1158
<tag-desc>
1159
enables an external dynamic module.
1160
</tag-desc>
1161
1162
</list>
1163
</para>
1164
1165
<para>
1166
<list type="tag">
1167
1168
<tag-name>
1169
<literal>--with-compat</literal>
1170
</tag-name>
1171
<tag-desc>
1172
enables dynamic modules compatibility.
1173
</tag-desc>
1174
1175
</list>
1176
</para>
1177
1178
<para>
1179
<list type="tag">
1180
1181
<tag-name>
1182
<literal>--with-cc=<value>path</value></literal>
1183
</tag-name>
1184
<tag-desc>
1185
sets the name of the C compiler.
1186
</tag-desc>
1187
1188
<tag-name>
1189
<literal>--with-cpp=<value>path</value></literal>
1190
</tag-name>
1191
<tag-desc>
1192
sets the name of the C preprocessor.
1193
</tag-desc>
1194
1195
<tag-name>
1196
<literal>--with-cc-opt=<value>parameters</value></literal>
1197
</tag-name>
1198
<tag-desc>
1199
sets additional parameters that will be added to the CFLAGS variable.
1200
When using the system PCRE library under FreeBSD,
1201
<literal>--with-cc-opt="-I /usr/local/include"</literal>
1202
should be specified.
1203
If the number of files supported by <c-func>select</c-func> needs to be
1204
increased it can also be specified here such as this:
1205
<literal>--with-cc-opt="-D FD_SETSIZE=2048"</literal>.
1206
</tag-desc>
1207
1208
<tag-name>
1209
<literal>--with-ld-opt=<value>parameters</value></literal>
1210
</tag-name>
1211
<tag-desc>
1212
sets additional parameters that will be used during linking.
1213
When using the system PCRE library under FreeBSD,
1214
<literal>--with-ld-opt="-L /usr/local/lib"</literal>
1215
should be specified.
1216
</tag-desc>
1217
1218
<tag-name>
1219
<literal>--with-cpu-opt=<value>cpu</value></literal>
1220
</tag-name>
1221
<tag-desc>
1222
enables building per specified CPU:
1223
<literal>pentium</literal>, <literal>pentiumpro</literal>,
1224
<literal>pentium3</literal>, <literal>pentium4</literal>,
1225
<literal>athlon</literal>, <literal>opteron</literal>,
1226
<literal>sparc32</literal>, <literal>sparc64</literal>,
1227
<literal>ppc64</literal>.
1228
</tag-desc>
1229
1230
</list>
1231
</para>
1232
1233
<para>
1234
<list type="tag">
1235
1236
<tag-name>
1237
<literal>--without-pcre</literal>
1238
</tag-name>
1239
<tag-desc>
1240
disables the usage of the PCRE library.
1241
</tag-desc>
1242
1243
<tag-name>
1244
<literal>--with-pcre</literal>
1245
</tag-name>
1246
<tag-desc>
1247
forces the usage of the PCRE library.
1248
</tag-desc>
1249
1250
<tag-name>
1251
<literal>--with-pcre=<value>path</value></literal>
1252
</tag-name>
1253
<tag-desc>
1254
sets the path to the sources of the PCRE library.
1255
The library distribution needs to be downloaded from the
1256
<link url="http://www.pcre.org">PCRE</link> site and extracted.
1257
The rest is done by nginx’s <command>./configure</command> and
1258
<command>make</command>.
1259
The library is required for regular expressions support in the
1260
<link doc="http/ngx_http_core_module.xml" id="location"/> directive
1261
and for the
1262
<link doc="http/ngx_http_rewrite_module.xml">ngx_http_rewrite_module</link>
1263
module.
1264
</tag-desc>
1265
1266
<tag-name>
1267
<literal>--with-pcre-opt=<value>parameters</value></literal>
1268
</tag-name>
1269
<tag-desc>
1270
sets additional build options for PCRE.
1271
</tag-desc>
1272
1273
<tag-name>
1274
<literal>--with-pcre-jit</literal>
1275
</tag-name>
1276
<tag-desc>
1277
builds the PCRE library with
1278
“just-in-time compilation” support (1.1.12, the
1279
<link doc="ngx_core_module.xml" id="pcre_jit"/> directive).
1280
</tag-desc>
1281
1282
<tag-name>
1283
<literal>--without-pcre2</literal>
1284
</tag-name>
1285
<tag-desc>
1286
disables use of the PCRE2 library
1287
instead of the original PCRE library (1.21.5).
1288
</tag-desc>
1289
1290
</list>
1291
</para>
1292
1293
<para>
1294
<list type="tag">
1295
1296
<tag-name>
1297
<literal>--with-zlib=<value>path</value></literal>
1298
</tag-name>
1299
<tag-desc>
1300
sets the path to the sources of the zlib library.
1301
The library distribution needs to be downloaded from the
1302
<link url="http://zlib.net">zlib</link> site and extracted.
1303
The rest is done by nginx’s <command>./configure</command> and
1304
<command>make</command>.
1305
The library is required for the
1306
<link doc="http/ngx_http_gzip_module.xml">ngx_http_gzip_module</link> module.
1307
</tag-desc>
1308
1309
<tag-name>
1310
<literal>--with-zlib-opt=<value>parameters</value></literal>
1311
</tag-name>
1312
<tag-desc>
1313
sets additional build options for zlib.
1314
</tag-desc>
1315
1316
<tag-name>
1317
<literal>--with-zlib-asm=<value>cpu</value></literal>
1318
</tag-name>
1319
<tag-desc>
1320
enables the use of the zlib assembler sources optimized
1321
for one of the specified CPUs:
1322
<literal>pentium</literal>, <literal>pentiumpro</literal>.
1323
</tag-desc>
1324
1325
</list>
1326
</para>
1327
1328
<para>
1329
<list type="tag">
1330
1331
<tag-name>
1332
<literal>--with-libatomic</literal>
1333
</tag-name>
1334
<tag-desc>
1335
forces the libatomic_ops library usage.
1336
</tag-desc>
1337
1338
<tag-name>
1339
<literal>--with-libatomic=<value>path</value></literal>
1340
</tag-name>
1341
<tag-desc>
1342
sets the path to the libatomic_ops library sources.
1343
</tag-desc>
1344
1345
</list>
1346
</para>
1347
1348
<para>
1349
<list type="tag">
1350
1351
<tag-name>
1352
<literal>--with-openssl=<value>path</value></literal>
1353
</tag-name>
1354
<tag-desc>
1355
sets the path to the OpenSSL library sources.
1356
</tag-desc>
1357
1358
<tag-name>
1359
<literal>--with-openssl-opt=<value>parameters</value></literal>
1360
</tag-name>
1361
<tag-desc>
1362
sets additional build options for OpenSSL.
1363
</tag-desc>
1364
1365
</list>
1366
</para>
1367
1368
<para>
1369
<list type="tag">
1370
1371
<tag-name>
1372
<literal>--with-debug</literal>
1373
</tag-name>
1374
<tag-desc>
1375
enables the <link doc="debugging_log.xml">debugging log</link>.
1376
</tag-desc>
1377
1378
</list>
1379
</para>
1380
1381
<para>
1382
Example of parameters usage (all of this needs to be typed in one line):
1383
<programlisting>
1384
./configure
1385
--sbin-path=/usr/local/nginx/nginx
1386
--conf-path=/usr/local/nginx/nginx.conf
1387
--pid-path=/usr/local/nginx/nginx.pid
1388
--with-http_ssl_module
1389
--with-pcre=../pcre2-10.39
1390
--with-zlib=../zlib-1.3
1391
</programlisting>
1392
</para>
1393
1394
<para>
1395
After configuration,
1396
nginx is compiled and installed using <command>make</command>.
1397
</para>
1398
1399
</section>
1400
1401
</article>
1402
1403