<!-- review: finished -->

<a id="sourcebuild"></a>

# Building Angie from Source

We recommend installing Angie from official pre-built
[packages](https://en.angie.software//angie/docs/installation/oss_packages.md#oss-packages).
However, if you still need your own build:

1. Download the `.tar.gz` archive from
   [our website](https://download.angie.software/files/):
   ```console
   $ curl -O https://download.angie.software/files/angie-|version|.tar.gz
   ```
2. Unpack the archive and navigate to the source directory:
   ```console
   $ tar -xpf angie-|version|.tar.gz
   $ cd angie-|version|
   ```
3. To prepare the build, use the **./configure** script,
   which determines the specific characteristics of the OS where the build occurs,
   particularly the methods that Angie can use to handle connections.
   After a successful run, the script creates a `Makefile`.

   Before running **./configure**, review and set the required
   [build options](#configure):
   ```console
   $ ./configure <OPTIONS>
   ```
4. When the `Makefile` is ready, build and install Angie:
   ```console
   $ make
   $ make install
   ```

<a id="configure"></a>

## Build Options

<a id="general"></a>

### General

| Option                 | Description                                                                                                                                                                                                                                                                                           | Default                                             |
|------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------|
| `--help`               | Prints a help message.                                                                                                                                                                                                                                                                                |                                                     |
| `--user=`name          | Sets the name of an unprivileged user whose credentials will be used by<br/>worker processes. After installation, the name can always be changed in<br/>the `angie.conf` configuration file using the [user](https://en.angie.software//angie/docs/configuration/modules/core.md#user)<br/>directive. | `nobody`                                            |
| `--group=`name         | Sets the name of a group whose credentials will be used by<br/>worker processes. After installation, the name can always be changed in<br/>the `angie.conf` configuration file using the [user](https://en.angie.software//angie/docs/configuration/modules/core.md#user)<br/>directive.              | `--user` setting                                    |
| `--build=`name         | Sets an optional name for the build.                                                                                                                                                                                                                                                                  |                                                     |
| `--builddir=`path      | Sets the build directory.                                                                                                                                                                                                                                                                             | `objs`                                              |
| `--feature-cache=`path | Specifies the directory for caching build artifacts.                                                                                                                                                                                                                                                  | If set without a path, `--builddir` setting is used |

<a id="paths"></a>

### Paths

| Option                              | Description                                                                                                                                                                                                                                                                                                                                        | Default                     |
|-------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------|
| `--prefix=`path                     | Defines the directory that will store server files. This same directory<br/>will also be used for all relative paths set by **./configure**<br/>(except for paths to library sources) and in the `angie.conf`<br/>configuration file.                                                                                                              | `/usr/local/angie`          |
| `--sbin-path=`path                  | Sets the name of the Angie executable. This name is used only during<br/>installation.                                                                                                                                                                                                                                                             | `<prefix>/sbin/angie`       |
| `--modules-path=`path               | Defines the directory where dynamic modules will be installed.                                                                                                                                                                                                                                                                                     | `<prefix>/modules`          |
| `--conf-path=`path                  | Sets the name of the `angie.conf` [configuration file](https://en.angie.software//angie/docs/configuration/configfile.md#configfile). If needed, you can always start Angie with a different<br/>configuration file using the `-c` [command-line option](https://en.angie.software//angie/docs/configuration/runtime.md#runtime-cli-options).      | `<prefix>/conf/angie.conf`  |
| `--error-log-path=`path             | Sets the name of the primary error, warning, and diagnostic log file.<br/>After installation, the file name can always be changed in the<br/>`angie.conf` configuration file using the [error_log](https://en.angie.software//angie/docs/configuration/modules/core.md#error-log)<br/>directive.                                                   | `<prefix>/logs/error.log`   |
| `--pid-path=`path                   | Sets the name of the `angie.pid` file that will store the process<br/>ID of the main process. After installation, the file name can always be<br/>changed in the `angie.conf` configuration file using the [pid](https://en.angie.software//angie/docs/configuration/modules/core.md#pid)<br/>directive.                                           | `<prefix>/logs/angie.pid`   |
| `--lock-path=`path                  | Sets the prefix for lock file names. After installation,<br/>the value can always be changed in the `angie.conf` configuration<br/>file using the [lock_file](https://en.angie.software//angie/docs/configuration/modules/core.md#lock-file) directive.                                                                                            | `<prefix>/logs/angie.lock`  |
| `--http-acme-client-path=`path      | Sets the directory to store certificates and keys for<br/>`server` blocks that have [acme](https://en.angie.software//angie/docs/configuration/modules/http/http_acme.md#id1) directives defined.                                                                                                                                                  | `<prefix>/acme_client`      |
| `--http-log-path=`path              | Sets the name of the primary request log file for the HTTP server. After<br/>installation, the file name can always be changed in the<br/>`angie.conf` configuration file using the [access_log](https://en.angie.software//angie/docs/configuration/modules/http/http_log.md#access-log)<br/>directive.                                           | `<prefix>/logs/access.log`  |
| `--http-client-body-temp-path=`path | Defines the directory for storing temporary files that hold client request<br/>bodies. After installation, the directory can always be changed in the<br/>`angie.conf` configuration file using the<br/>[client_body_temp_path](https://en.angie.software//angie/docs/configuration/modules/http/index.md#client-body-temp-path) directive.        | `<prefix>/client_body_temp` |
| `--http-proxy-temp-path=`path       | Defines the directory for storing temporary files with data received from<br/>proxied servers. After installation, the directory can always be changed<br/>in the `angie.conf` configuration file using the<br/>[proxy_temp_path](https://en.angie.software//angie/docs/configuration/modules/http/http_proxy.md#proxy-temp-path) directive.       | `<prefix>/proxy_temp`       |
| `--http-fastcgi-temp-path=`path     | Defines the directory for storing temporary files with data received from<br/>FastCGI servers. After installation, the directory can always be changed<br/>in the `angie.conf` configuration file using the<br/>[fastcgi_temp_path](https://en.angie.software//angie/docs/configuration/modules/http/http_fastcgi.md#fastcgi-temp-path) directive. | `<prefix>/fastcgi_temp`     |
| `--http-uwsgi-temp-path=`path       | Defines the directory for storing temporary files with data received from<br/>uWSGI servers. After installation, the directory can always be changed in<br/>the `angie.conf` configuration file using the<br/>[uwsgi_temp_path](https://en.angie.software//angie/docs/configuration/modules/http/http_uwsgi.md#uwsgi-temp-path) directive.         | `<prefix>/uwsgi_temp`       |
| `--http-scgi-temp-path=`path        | Defines the directory for storing temporary files with data received from<br/>SCGI servers. After installation, the directory can always be changed in<br/>the `angie.conf` configuration file using the<br/>[scgi_temp_path](https://en.angie.software//angie/docs/configuration/modules/http/http_scgi.md#scgi-temp-path) directive.             | `<prefix>/scgi_temp`        |

<a id="install-source-features"></a>

### Features and dependencies

| `--with-select_module`, `--without-select_module`   | Enables or disables building a module that allows the server to work with<br/>the `select()` method. This module is built automatically if the<br/>platform does not appear to support more appropriate methods such as<br/>`kqueue`, `epoll`, or `/dev/poll`.                                                                                                                                                                                                                                                                                                            |
|-----------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `--with-poll_module`, `--without-poll_module`       | Enables or disables building a module that allows the server to work with<br/>the `poll()` method. This module is built automatically if the<br/>platform does not appear to support more appropriate methods such as<br/>`kqueue`, `epoll`, or `/dev/poll`.                                                                                                                                                                                                                                                                                                              |
| `--with-threads`                                    | Enables the use of [thread pools](https://en.angie.software//angie/docs/configuration/modules/core.md#thread-pool)<br/>(`aio threads` mode).                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `--with-file-aio`                                   | Enables the use of [asynchronous file I/O](https://en.angie.software//angie/docs/configuration/modules/http/index.md#aio) (AIO) on FreeBSD<br/>and Linux (`aio on` mode).                                                                                                                                                                                                                                                                                                                                                                                                 |
| `--with-debug`                                      | Enables the [debugging log](https://en.angie.software//angie/docs/troubleshooting.md#debug-logging).                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `--without-http-cache`                              | Disables the HTTP cache.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `--with-pcre`, `--with-pcre=`path                   | Enables the use of the PCRE library.<br/><br/>The optional parameter sets the path to the sources of the PCRE library.<br/>The library distribution needs to be downloaded from the [PCRE](http://www.pcre.org/) site and extracted. The rest is done by Angie's<br/>**./configure** and **make** commands.<br/><br/>The library is **required** for regular expression support in the<br/>`location` directive and for the [Rewrite](https://en.angie.software//angie/docs/configuration/modules/http/http_rewrite.md#http-rewrite) module.                              |
| `--with-pcre-opt=`parameters                        | Sets additional build parameters for PCRE.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `--with-pcre-jit`                                   | Builds the PCRE library with JIT compilation support (the [pcre_jit](https://en.angie.software//angie/docs/configuration/modules/core.md#pcre-jit)<br/>directive).                                                                                                                                                                                                                                                                                                                                                                                                        |
| `--without-pcre`                                    | Disables the use of the PCRE library.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `--without-pcre2`                                   | Disables the use of the PCRE2 library instead of the original PCRE library.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `--with-libatomic`, `--with-libatomic=`path         | Enables building with the **libatomic_ops** library.<br/>The optional parameter sets the path to the library sources.                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `--with-openssl=`path                               | Enables static building and sets the path to the OpenSSL library sources. AWS-LC can be used as an OpenSSL-compatible library.                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `--with-openssl-opt=`parameters                     | Sets additional build parameters for OpenSSL.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `--with-ntls`                                       | Enables NTLS support in the HTTP module ([server-side](https://en.angie.software//angie/docs/configuration/modules/http/http_ssl.md#ssl-ntls), [client-side](https://en.angie.software//angie/docs/configuration/modules/http/http_proxy.md#proxy-ssl-ntls)) and stream<br/>module ([server-side](https://en.angie.software//angie/docs/configuration/modules/stream/stream_ssl.md#s-ssl-ntls), [client-side](https://en.angie.software//angie/docs/configuration/modules/stream/stream_proxy.md#s-proxy-ssl-ntls)) when building with an SSL library that supports NTLS. |
| `--with-zlib=`path                                  | Sets the path to the sources of the **zlib** library. The library<br/>distribution (version 1.1.3 — 1.2.11) needs to be downloaded from the<br/>[zlib site](http://zlib.net/) and extracted. The rest is done by<br/>Angie's **./configure** and **make** commands.<br/><br/>The library is **required** for the [GZip](https://en.angie.software//angie/docs/configuration/modules/http/http_gzip.md#http-gzip) module.                                                                                                                                                  |
| `--with-zlib-opt=`parameters                        | Sets additional build parameters for **zlib**.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `--with-zlib-asm=`cpu                               | Enables the use of assembly optimizations for building **zlib**,<br/>optimized for one of the following processors: `pentium`,<br/>`pentiumpro`.                                                                                                                                                                                                                                                                                                                                                                                                                          |

<a id="enabling-and-disabling-modules"></a>

### Enabling and Disabling Modules

You can disable modules that are enabled by default, or enable modules
that are available but disabled by default.

<a id="http-1"></a>

#### HTTP

Enabling additional modules:

| `--with-http_acme_module`                                                        | Enables building the [ACME](https://en.angie.software//angie/docs/configuration/modules/http/http_acme.md#http-acme) module,<br/>which enables the ACME protocol.                                                                                                                                                                                                                                                                                     |
|----------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `--with-http_addition_module`                                                    | Enables building the [Addition](https://en.angie.software//angie/docs/configuration/modules/http/http_addition.md#http-addition) module that allows adding text<br/>before and after a response.                                                                                                                                                                                                                                                      |
| `--with-http_auth_request_module`                                                | Enables building the [Auth Request](https://en.angie.software//angie/docs/configuration/modules/http/http_auth_request.md#http-auth-request) module that provides<br/>client authorization capability based on the result of a subrequest.                                                                                                                                                                                                            |
| `--with-http_dav_module`                                                         | Enables building the [DAV](https://en.angie.software//angie/docs/configuration/modules/http/http_dav.md#http-dav) module<br/>intended for automating file management tasks on the server via the<br/>WebDAV protocol.                                                                                                                                                                                                                                 |
| `--with-http_degradation_module`                                                 | Enables building the Degradation module that allows returning HTTP status<br/>codes 204 or 444 for certain `location` blocks.<br/><br/>This module can only be used in cases where `sbrk(0)`<br/>shows the actual amount of memory allocated to the process. In other<br/>words, the module works on FreeBSD up to version 7.0 by default. Starting<br/>from version 7.0, it works only if `MALLOC_OPTIONS=Dm` is set. On<br/>Linux it does not work. |
| `--with-http_flv_module`                                                         | Enables building the [FLV](https://en.angie.software//angie/docs/configuration/modules/http/http_flv.md#http-flv) module<br/>that provides server-side pseudo-streaming support for Flash<br/>Video (FLV) files.                                                                                                                                                                                                                                      |
| `--with-http_geoip_module`, `--with-http_geoip_module=dynamic`                   | Enables building the [GeoIP](https://en.angie.software//angie/docs/configuration/modules/http/http_geoip.md#http-geoip) module that creates variables whose<br/>values are determined based on the client's IP address and ready-made<br/>[MaxMind](http://www.maxmind.com/) databases.                                                                                                                                                               |
| `--with-http_gunzip_module`                                                      | Enables building the [GunZIP](https://en.angie.software//angie/docs/configuration/modules/http/http_gunzip.md#http-gunzip) module that allows decompressing<br/>responses with `Content-Encoding: gzip` for clients that do not<br/>support the `gzip` compression method.                                                                                                                                                                            |
| `--with-http_gzip_static_module`                                                 | Enables building the [Gzip Static](https://en.angie.software//angie/docs/configuration/modules/http/http_gzip_static.md#http-gzip-static) module that allows serving<br/>a precompressed file with the same name and the `.gz` extension<br/>instead of a regular file.                                                                                                                                                                               |
| `--with-http_image_filter_module`,<br/>`--with-http_image_filter_module=dynamic` | Enables building the [Image Filter](https://en.angie.software//angie/docs/configuration/modules/http/http_image_filter.md#http-image-filter) module that allows<br/>transforming images in JPEG, GIF, PNG, and WebP formats.                                                                                                                                                                                                                          |
| `--with-http_mp4_module`                                                         | Enables building the [MP4](https://en.angie.software//angie/docs/configuration/modules/http/http_mp4.md#http-mp4) module<br/>that provides server-side pseudo-streaming support for MP4 format files.                                                                                                                                                                                                                                                 |
| `--with-http_perl_module`, `--with-http_perl_module=dynamic`                     | Enables building the [Perl](https://en.angie.software//angie/docs/configuration/modules/http/http_perl.md#http-perl) module.                                                                                                                                                                                                                                                                                                                          |
| `--with-perl_modules_path=`path                                                  | Sets the directory where Perl module files will be located.                                                                                                                                                                                                                                                                                                                                                                                           |
| `--with-perl=`path                                                               | Sets the name of the Perl executable file.                                                                                                                                                                                                                                                                                                                                                                                                            |
| `--with-http_random_index_module`                                                | Enables building the [Random Index](https://en.angie.software//angie/docs/configuration/modules/http/http_random_index.md#http-random-index) module that serves requests<br/>ending with a slash (`/`) and returns a random file as the<br/>directory's index file.                                                                                                                                                                                   |
| `--with-http_realip_module`                                                      | Enables building the [RealIP](https://en.angie.software//angie/docs/configuration/modules/http/http_realip.md#http-realip) module that allows changing the<br/>client address to the one passed in the specified header field.                                                                                                                                                                                                                        |
| `--with-http_secure_link_module`                                                 | Enables building the [Secure Link](https://en.angie.software//angie/docs/configuration/modules/http/http_secure_link.md#http-secure-link) module.                                                                                                                                                                                                                                                                                                     |
| `--with-http_slice_module`                                                       | Enables building the [Slice](https://en.angie.software//angie/docs/configuration/modules/http/http_slice.md#http-slice) module that allows splitting a request into<br/>subrequests, each returning a specific range of the response.<br/>The module provides efficient caching of large responses.                                                                                                                                                   |
| `--with-http_ssl_module`                                                         | Enables [SSL](https://en.angie.software//angie/docs/configuration/modules/http/http_ssl.md#http-ssl) support for the<br/>HTTP server.<br/><br/>The OpenSSL library is **required** for this module.                                                                                                                                                                                                                                                   |
| `--with-http_stub_status_module`                                                 | Enables building the [Stub Status](https://en.angie.software//angie/docs/configuration/modules/http/http_stub_status.md#http-stub-status) module that provides access to<br/>basic server status information.                                                                                                                                                                                                                                         |
| `--with-http_sub_module`                                                         | Enables building the [Sub](https://en.angie.software//angie/docs/configuration/modules/http/http_sub.md#http-sub) module<br/>that allows modifying one specified string in the response to another.                                                                                                                                                                                                                                                   |
| `--with-http_upstream_probe_icmp` (PRO)                                          | Enables ICMP echo probes for the [upstream_probe (PRO)](https://en.angie.software//angie/docs/configuration/modules/http/http_upstream_probe.md#u-upstream-probe) directive. Requires OS ICMP support.                                                                                                                                                                                                                                                |
| `--with-http_v2_module`                                                          | Enables the [HTTP/2](https://en.angie.software//angie/docs/configuration/modules/http/http_v2.md#http-v2) module.                                                                                                                                                                                                                                                                                                                                     |
| `--with-http_v3_module`                                                          | Enables the [HTTP/3](https://en.angie.software//angie/docs/configuration/modules/http/http_v3.md#http-v3) module.                                                                                                                                                                                                                                                                                                                                     |

#### NOTE
For building, it is **strongly recommended** to use an SSL library
that supports the [QUIC](https://www.rfc-editor.org/rfc/rfc9000.html) protocol:

BoringSSL

Building with [BoringSSL](https://boringssl.googlesource.com/boringssl):

```console
$ ./configure
   --with-debug
   --with-http_v3_module
   --with-cc-opt="-I../boringssl/include"
   --with-ld-opt="-L../boringssl/build/ssl
                  -L../boringssl/build/crypto"
```

LibreSSL

Building with [LibreSSL](https://www.libressl.org/):

```console
$ ./configure
   --with-debug --with-http_v3_module
   --with-cc-opt="-I../libressl/build/include"
   --with-ld-opt="-L../libressl/build/lib"
```

QuicTLS

Building with [QuicTLS](https://github.com/quictls/openssl):

```console
$ ./configure
      --with-debug
      --with-http_v3_module
      --with-cc-opt="-I../quictls/build/include"
      --with-ld-opt="-L../quictls/build/lib"
```

Without this, the [OpenSSL](https://openssl.org/) library will be used in compatibility mode, where
[early data](https://datatracker.ietf.org/doc/html/rfc8446#section-2.3) sending is not
supported and other features are missing, such as session reuse. Such a
build will be able to interact **only** with clients and servers
using OpenSSL in the same mode.

| `--with-http_xslt_module`, `--with-http_xslt_module=dynamic`   | Enables building the [XSLT](https://en.angie.software//angie/docs/configuration/modules/http/http_xslt.md#http-xslt) module that allows transforming<br/>XML responses using XSLT stylesheets.<br/><br/>The **libxml2** and **libxslt** libraries are **required**<br/>for this module.                                                          |
|----------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `--with-google_perftools_module`                               | Enables building the [Google PerfTools](https://en.angie.software//angie/docs/configuration/modules/google_perftools.md#google-perftools) module that provides support<br/>for profiling Angie worker processes using [Google Performance<br/>Tools](https://github.com/gperftools/gperftools). The module is intended<br/>for Angie developers. |

Disabling standard modules:

| `--without-http`                            | Disables the [HTTP](https://en.angie.software//angie/docs/configuration/modules/http/index.md#http-core) server.                                                                                                                                                                                                                                                                                    |
|---------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `--without-http_access_module`              | Disables building the [Access](https://en.angie.software//angie/docs/configuration/modules/http/http_access.md#http-access) module<br/>that allows limiting access to certain client addresses.                                                                                                                                                                                                     |
| `--without-http_api_module`                 | Disables building the [API](https://en.angie.software//angie/docs/configuration/modules/http/http_api.md#http-api) module that<br/>provides a RESTful HTTP interface for accessing JSON-based information<br/>about the web server instance.                                                                                                                                                        |
| `--without-http_metric_module`              | Disables building the [Metric](https://en.angie.software//angie/docs/configuration/modules/http/http_metric.md#http-metric) module.                                                                                                                                                                                                                                                                 |
| `--without-http_auth_basic_module`          | Disables building the [Auth Basic](https://en.angie.software//angie/docs/configuration/modules/http/http_auth_basic.md#http-auth-basic)<br/>module that allows limiting access to resources by validating the user<br/>name and password using the HTTP Basic Authentication protocol.                                                                                                              |
| `--without-http_autoindex_module`           | Disables building the [AutoIndex](https://en.angie.software//angie/docs/configuration/modules/http/http_autoindex.md#http-autoindex)<br/>module that processes requests ending with the slash character<br/>(`/`) and produces a directory listing in case the [Index](https://en.angie.software//angie/docs/configuration/modules/http/http_index.md#http-index) module cannot find an index file. |
| `--without-http_browser_module`             | Disables building the [Browser](https://en.angie.software//angie/docs/configuration/modules/http/http_browser.md#http-browser)<br/>module that creates variables whose values depend on the value of the<br/>`User-Agent` request header field.                                                                                                                                                     |
| `--without-http_charset_module`             | Disables building the [Charset](https://en.angie.software//angie/docs/configuration/modules/http/http_charset.md#http-charset)<br/>module that adds the specified charset to the `Content-Type`<br/>response header field and can additionally convert data from one charset<br/>to another.                                                                                                        |
| `--without-http_empty_gif_module`           | Disables building the [module](https://en.angie.software//angie/docs/configuration/modules/http/http_empty_gif.md#http-empty-gif)<br/>that emits a single-pixel transparent GIF.                                                                                                                                                                                                                    |
| `--without-http_fastcgi_module`             | Disables building the [FastCGI](https://en.angie.software//angie/docs/configuration/modules/http/http_fastcgi.md#http-fastcgi)<br/>module that passes requests to a FastCGI server.                                                                                                                                                                                                                 |
| `--without-http_geo_module`                 | Disables building the [Geo](https://en.angie.software//angie/docs/configuration/modules/http/http_geo.md#http-geo) module that<br/>creates variables with values depending on the client IP address.                                                                                                                                                                                                |
| `--without-http_gzip_module`                | Disables building the [module](https://en.angie.software//angie/docs/configuration/modules/http/http_gzip.md#http-gzip) that<br/>compresses the HTTP server responses.<br/><br/>The **zlib** library is **required** for this module.                                                                                                                                                               |
| `--without-http_grpc_module`                | Disables building the [gRPC](https://en.angie.software//angie/docs/configuration/modules/http/http_grpc.md#http-grpc) module that<br/>passes requests to a gRPC server.                                                                                                                                                                                                                             |
| `--without-http_limit_conn_module`          | Disables building the [Limit Conn](https://en.angie.software//angie/docs/configuration/modules/http/http_limit_conn.md#http-limit-conn)<br/>module that limits the number of connections per key, for example, the<br/>number of connections from a single IP address.                                                                                                                              |
| `--without-http_limit_req_module`           | Disables building the [Limit Req](https://en.angie.software//angie/docs/configuration/modules/http/http_limit_req.md#http-limit-req)<br/>module that limits the request processing rate per key, for example, the<br/>processing rate of requests coming from a single IP address.                                                                                                                  |
| `--without-http_map_module`                 | Disables building the [Map](https://en.angie.software//angie/docs/configuration/modules/http/http_map.md#http-map) module that<br/>creates variables with values depending on the values of other variables.                                                                                                                                                                                        |
| `--without-http_memcached_module`           | Disables building the [Memcached](https://en.angie.software//angie/docs/configuration/modules/http/http_memcached.md#http-memcached)<br/>module that obtains responses from a memcached server.                                                                                                                                                                                                     |
| `--without-http_mirror_module`              | Disables building the [Mirror](https://en.angie.software//angie/docs/configuration/modules/http/http_mirror.md#http-mirror) module<br/>that implements mirroring of an original request by creating background<br/>mirror subrequests.                                                                                                                                                              |
| `--without-http_prometheus_module`          | Disables building the [Prometheus](https://en.angie.software//angie/docs/configuration/modules/http/http_prometheus.md#http-prometheus)<br/>module for the HTTP server.                                                                                                                                                                                                                             |
| `--without-http_proxy_module`               | Disables building the [Proxy](https://en.angie.software//angie/docs/configuration/modules/http/http_proxy.md#http-proxy) module for the HTTP server.                                                                                                                                                                                                                                                |
| `--without-http_referer_module`             | Disables building the [Referer](https://en.angie.software//angie/docs/configuration/modules/http/http_referer.md#http-referer)<br/>module that can block access to a site for requests with invalid values<br/>in the `Referer` header field.                                                                                                                                                       |
| `--without-http_rewrite_module`             | Disables building the [Rewrite](https://en.angie.software//angie/docs/configuration/modules/http/http_rewrite.md#http-rewrite)<br/>module that allows the HTTP server to redirect requests and change their<br/>URIs.<br/><br/>The PCRE library is **required** for this module.                                                                                                                    |
| `--without-http_scgi_module`                | Disables building the [SCGI](https://en.angie.software//angie/docs/configuration/modules/http/http_scgi.md#http-scgi) module that<br/>passes requests to an SCGI server.                                                                                                                                                                                                                            |
| `--without-http_split_clients_module`       | Disables building the [Split Clients](https://en.angie.software//angie/docs/configuration/modules/http/http_split_clients.md#http-split-clients) module that creates<br/>variables for A/B testing.                                                                                                                                                                                                 |
| `--without-http_ssi_module`                 | Disables building the [SSI](https://en.angie.software//angie/docs/configuration/modules/http/http_ssi.md#http-ssi) module that<br/>processes SSI (Server Side Includes) commands in responses passing<br/>through it.                                                                                                                                                                               |
| `--without-http_upstream_hash_module`       | Disables building the module that implements the [hash](https://en.angie.software//angie/docs/configuration/modules/http/http_upstream.md#u-hash) load<br/>balancing method.                                                                                                                                                                                                                        |
| `--without-http_upstream_ip_hash_module`    | Disables building the module that implements the [ip_hash](https://en.angie.software//angie/docs/configuration/modules/http/http_upstream.md#u-ip-hash) load<br/>balancing method.                                                                                                                                                                                                                  |
| `--without-http_upstream_keepalive_module`  | Disables building the module that provides [connection caching](https://en.angie.software//angie/docs/configuration/modules/http/http_upstream.md#u-keepalive) to upstream servers.                                                                                                                                                                                                                 |
| `--without-http_upstream_least_conn_module` | Disables building the module that implements the [least_conn](https://en.angie.software//angie/docs/configuration/modules/http/http_upstream.md#u-least-conn)<br/>load balancing method.                                                                                                                                                                                                            |
| `--without-http_upstream_random_module`     | Disables building the module that implements the [random](https://en.angie.software//angie/docs/configuration/modules/http/http_upstream.md#u-random) load<br/>balancing method.                                                                                                                                                                                                                    |
| `--without-http_upstream_sticky_module`     | Disables building the module that implements [session persistence](https://en.angie.software//angie/docs/configuration/modules/http/http_upstream.md#u-sticky), ensuring all requests in the client session are passed to<br/>the same server in the upstream.                                                                                                                                      |
| `--without-http_upstream_zone_module`       | Disables building the module that allows storing the run-time state of an upstream<br/>in a [shared memory zone](https://en.angie.software//angie/docs/configuration/modules/http/http_upstream.md#u-zone).                                                                                                                                                                                         |
| `--without-http_userid_module`              | Disables building the [UserID](https://en.angie.software//angie/docs/configuration/modules/http/http_userid.md#http-userid) module<br/>that sets cookies suitable for client identification.                                                                                                                                                                                                        |
| `--without-http_uwsgi_module`               | Disables building the [uWSGI](https://en.angie.software//angie/docs/configuration/modules/http/http_uwsgi.md#http-uwsgi) module<br/>that passes requests to a uWSGI server.                                                                                                                                                                                                                         |

<a id="stream-modules"></a>

#### Stream modules

Enabling additional modules:

#### \* - `--with-stream`, `--with-stream=dynamic`<br/>  - Enables the core [Stream](https://en.angie.software//angie/docs/configuration/modules/stream/index.md#stream-core)<br/>    module for generic TCP/UDP proxying and load balancing.

| `--with-stream_acme_module`                                        | Enables building the [ACME](https://en.angie.software//angie/docs/configuration/modules/stream/stream_acme.md#stream-acme) module,<br/>which enables the ACME protocol.                                                                                                                                                                                                                                                                |
|--------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `--with-stream_geoip_module`, `--with-stream_geoip_module=dynamic` | Enables the [GeoIP](https://en.angie.software//angie/docs/configuration/modules/stream/stream_geoip.md#stream-geoip) module<br/>that creates variables depending on the client IP address and the<br/>precompiled [MaxMind](http://www.maxmind.com/) databases.                                                                                                                                                                        |
| `--with-stream_mqtt_preread_module`                                | Enables the [MQTT Preread](https://en.angie.software//angie/docs/configuration/modules/stream/stream_mqtt_preread.md#stream-mqtt-preread) module that allows<br/>extracting client IDs and usernames from `CONNECT` packets in MQTT<br/>versions [3.1.1](http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Toc398718028)<br/>and [5.0](https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901033). |
| `--with-stream_rdp_preread_module`                                 | Enables the [RDP Preread](https://en.angie.software//angie/docs/configuration/modules/stream/stream_rdp_preread.md#stream-rdp-preread) module that allows<br/>extracting cookies from RDP sessions.                                                                                                                                                                                                                                    |
| `--with-stream_realip_module`                                      | Enables the [RealIP](https://en.angie.software//angie/docs/configuration/modules/stream/stream_realip.md#stream-realip) module<br/>that changes the client address to the address sent in the PROXY protocol<br/>header.                                                                                                                                                                                                               |
| `--with-stream_ssl_module`                                         | Enables [SSL](https://en.angie.software//angie/docs/configuration/modules/stream/stream_ssl.md#stream-ssl) support for the<br/>Stream server.<br/><br/>The OpenSSL library is **required** to build and run this module.                                                                                                                                                                                                               |
| `--with-stream_ssl_preread_module`                                 | Enables the [SSL Preread](https://en.angie.software//angie/docs/configuration/modules/stream/stream_ssl_preread.md#stream-ssl-preread) module that allows<br/>extracting information from [ClientHello](https://datatracker.ietf.org/doc/html/rfc5246#section-7.4.1.2)<br/>messages without terminating SSL/TLS.                                                                                                                       |
| `--with-stream_upstream_probe_icmp` (PRO)                          | Enables ICMP echo probes for the [upstream_probe (PRO)](https://en.angie.software//angie/docs/configuration/modules/stream/stream_upstream_probe.md#s-u-upstream-probe) directive. Requires OS ICMP support.                                                                                                                                                                                                                           |

Disabling standard modules:

#### \* - `--without-stream_access_module`<br/>  - Disables the [Access](https://en.angie.software//angie/docs/configuration/modules/stream/stream_access.md#stream-access)<br/>    module that allows limiting access to certain client addresses.

| `--without-stream_geo_module`                 | Disables the [Geo](https://en.angie.software//angie/docs/configuration/modules/stream/stream_geo.md#stream-geo) module that<br/>creates variables with values depending on the client IP address.                                                                   |
|-----------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `--without-stream_limit_conn_module`          | Disables the [Limit Conn](https://en.angie.software//angie/docs/configuration/modules/stream/stream_limit_conn.md#stream-limit-conn) module that limits the<br/>number of connections per key, for example, the number of connections<br/>from a single IP address. |
| `--without-stream_map_module`                 | Disables the [Map](https://en.angie.software//angie/docs/configuration/modules/stream/stream_map.md#stream-map) module that<br/>creates variables with values depending on values of other variables.                                                               |
| `--without-stream_return_module`              | Disables the [Return](https://en.angie.software//angie/docs/configuration/modules/stream/stream_return.md#stream-return)<br/>module that sends the specified value to the client and then closes the<br/>connection.                                                |
| `--without-stream_set_module`                 | Disables the [Set](https://en.angie.software//angie/docs/configuration/modules/stream/stream_set.md#stream-set) module that<br/>sets a value for a variable.                                                                                                        |
| `--without-stream_split_clients_module`       | Disables the [Split Clients](https://en.angie.software//angie/docs/configuration/modules/stream/stream_split_clients.md#stream-split-clients) module that creates<br/>variables for A/B testing.                                                                    |
| `--without-stream_upstream_hash_module`       | Disables the module that implements the [hash](https://en.angie.software//angie/docs/configuration/modules/stream/stream_upstream.md#s-u-hash) load<br/>balancing method.                                                                                           |
| `--without-stream_upstream_least_conn_module` | Disables the module that implements the [least_conn](https://en.angie.software//angie/docs/configuration/modules/stream/stream_upstream.md#s-u-least-conn) load balancing method.                                                                                   |
| `--without-stream_upstream_random_module`     | Disables the module that implements the [random](https://en.angie.software//angie/docs/configuration/modules/stream/stream_upstream.md#s-u-random) load<br/>balancing method.                                                                                       |
| `--without-stream_upstream_zone_module`       | Disables the module that enables storing the run-time state of an<br/>upstream in a [shared memory zone](https://en.angie.software//angie/docs/configuration/modules/stream/stream_upstream.md#s-u-zone).                                                           |

<a id="mail"></a>

#### Mail

Enabling additional modules:

#### \* - `--with-mail`, `--with-mail=dynamic`<br/>  - Enables the core [Mail](https://en.angie.software//angie/docs/configuration/modules/mail/index.md#mail-core) module<br/>    that supports POP3, IMAP4, and SMTP.

| `--with-mail_ssl_module`   | Enables [SSL](https://en.angie.software//angie/docs/configuration/modules/mail/mail_ssl.md#mail-ssl) support for<br/>the Mail server.<br/><br/>The OpenSSL library is **required** to build and run this module.   |
|----------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|

Disabling standard modules:

#### \* - `--without-mail_imap_module`<br/>  - Disables the [IMAP](https://en.angie.software//angie/docs/configuration/modules/mail/mail_imap.md#mail-imap) protocol in<br/>    the Mail server.

| `--without-mail_pop3_module`   | Disables the [POP3](https://en.angie.software//angie/docs/configuration/modules/mail/mail_pop3.md#mail-pop3) protocol in<br/>the Mail server.   |
|--------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------|
| `--without-mail_smtp_module`   | Disables the [SMTP](https://en.angie.software//angie/docs/configuration/modules/mail/mail_smtp.md#mail-smtp) protocol in<br/>the Mail server.   |

<a id="other-options"></a>

#### Other options

#### \* - `--with-cpp_test_module`<br/>  - Enables the CPP Test module. It's used primarily for development<br/>    and testing purposes and isn't intended for production use.

| `--add-module=`path         | Enables building an external module at the specified path.                                                                                                                                                                                                                                                                                                    |
|-----------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `--add-dynamic-module=`path | Enables building an external dynamic module at the specified path.                                                                                                                                                                                                                                                                                            |
| `--with-compat`             | Enables dynamic module compatibility mode. When enabled, Angie can load and<br/>use dynamic modules that were built for the same Angie version,<br/>even if these modules were built with different options. Angie PRO can<br/>load only modules built for Angie PRO; Angie (OSS) modules are rejected due<br/>to a different module signature.               |
| `--with-cc=`path            | Sets the compiler to be used during the build.                                                                                                                                                                                                                                                                                                                |
| `--with-cpp=`path           | Sets the preprocessor to be used during the build.                                                                                                                                                                                                                                                                                                            |
| `--with-cc-opt=`parameters  | Sets additional parameters that will be added to the `CFLAGS`<br/>variable. When using the system PCRE library under FreeBSD,<br/>`--with-cc-opt="-I /usr/local/include"` should be specified. If the<br/>number of files supported by `select()` needs to be increased, it<br/>can also be specified here, such as `--with-cc-opt="-D<br/>FD_SETSIZE=2048"`. |
| `--with-ld-opt=`parameters  | Sets additional parameters that will be used during linking. When using<br/>the system PCRE library under FreeBSD, `--with-ld-opt="-L<br/>/usr/local/lib"` should be specified.                                                                                                                                                                               |
| `--with-cpu-opt=`cpu        | Enables builds optimized for one of the following processors:<br/>`pentium`, `pentiumpro`, `pentium3`, `pentium4`,<br/>`athlon`, `opteron`, `sparc32`, `sparc64`,<br/>`ppc64`.                                                                                                                                                                                |

<a id="examples-2"></a>

### Examples

**Simple HTTPS-Enabled Build**. This basic configuration enables HTTPS support
using SSL/TLS, with the necessary dependencies (PCRE for regular expressions,
**zlib** for compression, and OpenSSL for SSL/TLS):

```console
$ ./configure \
    --sbin-path=/usr/sbin/angie \
    --conf-path=/etc/angie/angie.conf \
    --pid-path=/run/angie.pid \
    --with-http_ssl_module \
    --with-pcre=../pcre2-10.40 \
    --with-zlib=../zlib-1.3 \
    --with-openssl=../openssl-3.0.8
```

**Performance-Optimized Build**. This configuration is optimized for performance,
including HTTP/2 support, **gzip** static compression, JIT for PCRE, and
asynchronous I/O; thread pools are also enabled for efficient handling of high
loads:

```console
$ ./configure \
    --sbin-path=/usr/sbin/angie \
    --conf-path=/etc/angie/angie.conf \
    --pid-path=/run/angie.pid \
    --with-http_ssl_module \
    --with-http_v2_module \
    --with-http_gzip_static_module \
    --with-pcre=../pcre2-10.40 \
    --with-pcre-jit \
    --with-zlib=../zlib-1.3 \
    --with-threads \
    --with-file-aio
```

**Load Balancer with TCP/UDP Proxying**. This configuration sets up a load
balancer for both HTTP and non-HTTP services:

```console
$ ./configure \
    --sbin-path=/usr/sbin/angie \
    --conf-path=/etc/angie/angie.conf \
    --pid-path=/run/angie.pid \
    --with-stream \
    --with-stream_ssl_module \
    --with-pcre=../pcre2-10.40 \
    --with-zlib=../zlib-1.3
```

**Specialized Build**. This configuration includes HTTPS, HTTP/2, compression,
enhanced security and performance, along with additional modules for Brotli
compression and cache management, optimized for both HTTP and TCP/UDP proxying:

```console
$ ./configure \
    --prefix=/usr/local/angie \                        # Installation directory for Angie
    --sbin-path=/usr/sbin/angie \                      # Path to the Angie binary
    --conf-path=/etc/angie/angie.conf \                # Path to the main configuration file
    --pid-path=/run/angie.pid \                        # Path to the PID file
    --lock-path=/var/lock/angie.lock \                 # Path to the lock file
    --error-log-path=/var/log/angie/error.log \        # Path to the error log file
    --http-log-path=/var/log/angie/access.log \        # Path to the access log file
    --with-http_ssl_module \                           # Enables SSL module for HTTPS
    --with-http_v2_module \                            # Enables HTTP/2 support for improved performance
    --with-http_realip_module \                        # Allows Angie to correctly handle X-Real-IP and X-Forwarded-For headers
    --with-http_gzip_static_module \                   # Serves pre-compressed .gz files to reduce CPU load
    --with-http_stub_status_module \                   # Provides a status page
    --with-threads \                                   # Enables thread pools for improved performance under heavy load
    --with-file-aio \                                  # Enables asynchronous I/O
    --with-stream \                                    # Enables TCP/UDP proxy functionality
    --with-stream_ssl_module \                         # Adds SSL/TLS support for TCP/UDP proxy
    --with-pcre=../pcre2-10.40 \                       # Specifies the path to the PCRE library for regex support
    --with-pcre-jit \                                  # Enables just-in-time compilation for PCRE
    --with-zlib=../zlib-1.3 \                          # Specifies the path to the zlib library for compression
    --with-openssl=../openssl-3.0.8 \                  # Specifies the path to the OpenSSL library for SSL/TLS
    --with-openssl-opt="enable-ec_nistp_64_gcc_128" \  # Optimizes OpenSSL for 64-bit NIST curves
    --add-module=../ngx_brotli \                       # Adds third-party ngx_brotli module for Brotli compression support
    --add-dynamic-module=../ngx_cache_purge            # Adds third-party ngx_cache_purge module for cache management
```
