refer to : https://docs.nginx.com/nginx/admin-guide/installing-nginx/installing-nginx-open-source/
Modules Built by Default
If you do not need a module that is built by default, you can disable it by naming it with the --without-<MODULE-NAME>
option on the configure
script, as in this example which disables the Empty GIF module (should be typed as a single line):
./configure
--sbin-path=/usr/local/nginx/nginx
--conf-path=/usr/local/nginx/nginx.conf
--pid-path=/usr/local/nginx/nginx.pid
--with-http_ssl_module
--with-stream
--with-pcre=../pcre2-10.42
--with-zlib=../zlib-1.2.13
--without-http_empty_gif_module
Module Name | Description |
---|---|
http_access_module | Accepts or denies requests from specified client addresses. |
http_auth_basic_module | Limits access to resources by validating the user name and password using the HTTP Basic Authentication protocol. |
http_autoindex_module | Processes requests ending with the forward-slash character (/) and produces a directory listing. |
http_browser_module | Creates variables whose values depend on the value of the User-Agent request header. |
http_charset_module | Adds the specified character set to the Content-Type response header. Can convert data from one character set to another. |
http_empty_gif_module | Emits a single-pixel transparent GIF. |
http_fastcgi_module | Passes requests to a FastCGI server. |
http_geo_module | Creates variables with values that depend on the client IP address. |
http_gzip_module | Compresses responses using gzip , reducing the amount of transmitted data by half or more. |
http_limit_conn_module | Limits the number of connections per a defined key, in particular, the number of connections from a single IP address. |
http_limit_req_module | Limits the request processing rate per a defined key, in particular, the processing rate of requests coming from a single IP address. |
http_map_module | Creates variables whose values depend on the values of other variables. |
http_memcached_module | Passes requests to a memcached server. |
http_proxy_module | Passes HTTP requests to another server. |
http_referer_module | Blocks requests with invalid values in the Referer header. |
http_rewrite_module | Changes the request URI using regular expressions and return redirects; conditionally selects configurations. Requires the PCRE library. |
http_scgi_module | Passes requests to an SCGI server. |
http_ssi_module | Processes SSI (Server Side Includes) commands in responses passing through it. |
http_split_clients_module | Creates variables suitable for A/B testing, also known as split testing. |
http_upstream_hash_module | Enables the generic Hash load-balancing method. |
http_upstream_ip_hash_module | Enables the IP Hash load-balancing method. |
http_upstream_keepalive_module | Enables keepalive connections. |
http_upstream_least_conn_module | Enables the Least Connections load-balancing method. |
http_upstream_zone_module | Enables shared memory zones. |
http_userid_module | Sets cookies suitable for client identification. |
http_uwsgi_module | Passes requests to a uwsgi server. |
Modules Not Built by Default
Many NGINX modules are not built by default, and must be listed on the configure
command line to be built.
The mail, stream, geoip, image_filter, perl and xslt
modules can be compiled as dynamic. See Dynamic Modules for details.
An example of the configure
command that includes nondefault modules (should be typed as a single line):
./configure
--sbin-path=/usr/local/nginx/nginx
--conf-path=/usr/local/nginx/nginx.conf
--pid-path=/usr/local/nginx/nginx.pid
--with-pcre=../pcre2-10.42
--with-zlib=../zlib-1.2.13
--with-http_ssl_module
--with-stream
--with-mail
-
--with-cpp_test_module
- Tests the C++ compatibility of header files.
-
--with-debug
- Enables the debugging log.
-
--with-file-aio
- Enables asynchronous I/O.
- Allows using Google Performance tools library.
-
--
with-http_addition_module- Adds text before and after a response.
-
--
with-http_auth_request_module- Implements client authorization based on the result of a subrequest.
-
--
with-http_dav_module- Enables file management automation using the WebDAV protocol.
-
--with-http_degradation_module
- Allows returning an error when a memory size exceeds the defined value.
-
--
with-http_flv_module- Provides pseudo-streaming server-side support for Flash Video (FLV) files.
-
--
with-http_geoip_module- Enables creating variables whose values depend on the client IP address. The module uses MaxMind GeoIP databases. To compile as a separate dynamic module instead, change the option to
--with-http_geoip_module=dynamic
.
-
--
with-http_gunzip_module- Decompresses responses with
Content-Encoding: gzip
for clients that do not support the zip encoding method.
-
--
with-http_gzip_static_module- Allows sending precompressed files with the .gz filename extension instead of regular files.
-
--
with-http_image_filter_module- Transforms images in JPEG, GIF, and PNG formats. The module requires the LibGD library. To compile as a separate dynamic module instead, change the option to
--with-http_image_filter_module=dynamic
.
-
--
with-http_mp4_module- Provides pseudo-streaming server-side support for MP4 files.
-
--
with-http_perl_module- Used to implement location and variable handlers in Perl and insert Perl calls into SSI. Requires the PERL library. To compile as a separate dynamic module instead, change the option to
--with-http_perl_module=dynamic
.
-
--
with-http_random_index_module- Processes requests ending with the slash character (‘/’) and picks a random file in a directory to serve as an index file.
-
--
with-http_realip_module- Changes the client address to the one sent in the specified header field.
-
--
with-http_secure_link_module- Used to check authenticity of requested links, protect resources from unauthorized access, and limit link lifetime.
-
--
with-http_slice_module- Allows splitting a request into subrequests, each subrequest returns a certain range of response. Provides more effective caching of large files.
-
--
with-http_ssl_module- Enables HTTPS support. Requires an SSL library such as OpenSSL.
-
--
with-http_stub_status_module- Provides access to basic status information. Note that NGINX Plus customers do not require this module as they are already provided with extended status metrics and interactive dashboard.
-
--
with-http_sub_module- Modifies a response by replacing one specified string by another.
-
--
with-http_xslt_module- Transforms XML responses using one or more XSLT stylesheets. The module requires the Libxml2 and XSLT libraries. To compile as a separate dynamic module instead, change the option to
--with-http_xslt_module=dynamic
.
-
--
with-http_v2_module- Enable support for HTTP/2. See The HTTP/2 Module in NGINX on the NGINX blog for details.
-
--
with-mail- Enables mail proxy functionality. To compile as a separate dynamic module instead, change the option to
--with-mail=dynamic
.
-
--
with-mail_ssl_module- Provides support for a mail proxy server to work with the SSL/TLS protocol. Requires an SSL library such as OpenSSL.
-
--
with-stream- Enables the TCP and UDP proxy functionality. To compile as a separate dynamic module instead, change the option to
--with-stream=dynamic
.
-
--
with-stream_ssl_module- Provides support for a stream proxy server to work with the SSL/TLS protocol. Requires an SSL library such as OpenSSL.
-
--with-threads
- Enables NGINX to use thread pools. For details, see Thread Pools in NGINX Boost Performance 9x! on the NGINX blog.