Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

A complete set of nginx compiling and installing configuration modules

2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Use the configure command to configure the build. It defines all aspects of the system, including methods that allow nginx to be used for connection processing. Finally, it creates a Makefile.

The configure command supports the following parameters:

-- help

Print help information.

-- prefix=path

Define the directory where server files will be retained. This same directory will also be used in all relative paths set configure (except the library source path) and in the nginx.conf configuration file. / usr/local/nginx is set to a directory by default.

-- sbin-path=path

Sets the name of the nginx executable. This name is used only during installation. By default, the file name is prefix/sbin/nginx.

-- modules-path=path

Define the directory where the nginx dynamic module will be installed. The prefix/modules directory is used by default.

-- conf-path=path

Sets the name of the nginx.conf profile. If desired, you can always start it with a different configuration file by specifying nginx in the command line argument. By default, the file name is. -c fileprefix/conf/nginx.conf

-- error-log-path=path

Set the name of the main error, warning, and diagnostic file. After installation, nginx.conf can always use the error_log directive to change the file name in the configuration file. By default, the file name is prefix/logs/error.log.

-- pid-path=path

Set the file name of the process ID that nginx.pid will store the main process. After installation, nginx.conf can always use the pid directive to change the file name in the configuration file. By default, the file name is prefix/logs/nginx.pid.

-- lock-path=path

Sets the prefix for the name of the locked file. After installation, nginx.conf can always use the lock_file directive to change the value in the configuration file. By default, the value is prefix/logs/nginx.lock.

-- user=name

Sets the name of an unprivileged user whose credentials will be used by the worker process. After installation, nginx.conf can always change the name in the configuration file using user instructions. The default user name is nobody.

-- group=name

Sets the name of the group whose credentials will be used by the worker process. After installation, nginx.conf can always change the name in the configuration file using user instructions. By default, the group name is set to the name of an unprivileged user.

-- build=name

Set an optional nginx build name.

-- builddir=path

Set up the build directory.

-with-select_module and-without-select_module

Enable or disable building modules that allow the server to use the select () method. If the platform does not seem to support more appropriate methods such as kqueue,epoll or / dev / poll, this module will be built automatically.

-with-poll_module and-without-poll_module

Enable or disable building modules that allow the server to use the poll () method. If the platform does not seem to support more appropriate methods such as kqueue,epoll or / dev / poll, this module will be built automatically.

-- with-threads

Enables the use of thread pools.

-- with-file-aio

Asynchronous file I / O (AIO) is supported on FreeBSD and Linux.

-- with-http_ssl_module

Enable the ability to build modules that add HTTPS protocol support to the HTTP server. This module is not built by default. The OpenSSL library is required to build and run this module.

-- with-http_v2_module

Support for building a module that provides support for HTTP / 2. This module is not built by default.

-- with-http_realip_module

Support for building a ngx_http_realip_module module that changes the client address to the address sent in the specified header field. This module is not built by default.

-- with-http_addition_module

Allows you to build a ngx_http_addition_module module that adds text before and after the response. This module is not built by default.

-with-http_xslt_module and-with-http_xslt_module=dynamic

Support for building a ngx_http_xslt_module module that uses one or more XSLT stylesheets to transform XML responses. This module is not built by default. The libxslt library of the libxml2 and needs to build and run this module.

-with-http_image_filter_module and-with-http_image_filter_module=dynamic

Support for building a ngx_http_image_filter_module module that can convert images in JPEG,GIF,PNG and WebP formats. This module is not built by default.

-with-http_geoip_module and-with-http_geoip_module=dynamic

Support for building a ngx_http_geoip_module module that creates variables based on client IP addresses and precompiled MaxMind databases. This module is not built by default.

-- with-http_sub_module

Support for building a ngx_http_sub_module module that modifies the response by replacing one specified string with another specified string. This module is not built by default.

-- with-http_dav_module

Supports the construction of a ngx_http_dav_module module that provides file management automation through the WebDAV protocol. This module is not built by default.

-- with-http_flv_module

Support for building a ngx_http_flv_module module that provides pseudo-streaming server-side support for Flash Video (FLV) files. This module is not built by default. * *-with-http_mp4_module** supports the construction of ngx_http_mp4_module module, which provides pseudo-streaming server-side support for MP4 files. This module is not built by default.

-- with-http_gunzip_module

Support for building ngx_http_gunzip_module modules for clients that do not support the "gzip" encoding method, which uses "Content-Encoding: gzip" to extract the response. This module is not built by default.

-- with-http_gzip_static_module

Support for building ngx_http_gzip_static_module modules that support sending pre-compressed files with the .gz extension "" instead of regular files. This module is not built by default.

-- with-http_auth_request_module

Allows you to build a ngx_http_auth_request_module module that implements client authorization based on the results of sub-requests. This module is not built by default.

-- with-http_random_index_module

Support for building a ngx_http_random_index_module module that processes requests that end with a slash ('/') and selects a random file from the directory as the index file. This module is not built by default.

-- with-http_secure_link_module

Enable the build ngx_http_secure_link_module module. This module is not built by default.

-- with-http_degradation_module

Enable the build ngx_http_degradation_module module. This module is not built by default.

-- with-http_slice_module

Support for building a ngx_http_slice_module module that splits the request into sub-requests, each of which returns a range of responses. This module provides a more efficient large response cache. This module is not built by default.

-- with-http_stub_status_module

Support for building a ngx_http_stub_status_module module that provides access to basic state information. This module is not built by default.

-- without-http_charset_module

Disables building the ngx_http_charset_module module, which adds the specified character set to the "Content-Type" response header field and converts data from one character set to another.

-- without-http_gzip_module

Disable modules that build compressible HTTP server responses. The zlib library is required to build and run this module.

-- without-http_ssi_module

Disable the build to process the response of the ngx_http_ssi_module module through the SSI (server-side include) command.

-- without-http_userid_module

Disable building the ngx_http_userid_module module, which sets the cookie that applies to the client identity.

-- without-http_access_module

Disable building the ngx_http_access_module module, which allows you to restrict access to certain client addresses.

-- without-http_auth_basic_module

Disables building the ngx_http_auth_basic_module module, which allows you to restrict access to resources by verifying user names and passwords using the HTTP basic Authentication protocol.

-- without-http_mirror_module

Disable building the ngx_http_mirror_module module, which mirrors the original request by creating a background mirror subrequest.

-- without-http_autoindex_module

Disable building the ngx_http_autoindex_module module to handle requests that end with a slash ('/') and generate a directory list if the ngx_http_index_module module cannot find the index file.

-- without-http_geo_module

Disable building the ngx_http_geo_module module, which creates variables whose values depend on the client IP address.

-- without-http_map_module

Disable building the ngx_http_map_module module, which creates variables whose values depend on the values of other variables.

-- without-http_split_clients_module

Disable building the ngx_http_split_clients_module module, which creates variables for A / B tests.

-- without-http_referer_module

Disable the build ngx_http_referer_module module, which blocks access to sites with requests with invalid values in the "Referer" header field.

-- without-http_rewrite_module

Disable building modules that allow the HTTP server to redirect the request and change the request URI. The PCRE library is required to build and run this module.

-- without-http_proxy_module

Disable building the HTTP server proxy module.

-- without-http_fastcgi_module

Disable building the ngx_http_fastcgi_module module that passes the request to the FastCGI server.

-- without-http_uwsgi_module

Disable building the ngx_http_uwsgi_module module that passes the request to the uwsgi server.

-- without-http_scgi_module

Disable building the ngx_http_scgi_module module that passes the request to the SCGI server.

-- without-http_grpc_module

Disable building the ngx_http_grpc_module module that passes the request to the gRPC server.

-- without-http_memcached_module

Disable building the ngx_http_memcached_module module, which gets the response from the memcached server.

-- without-http_limit_conn_module

Disable building the ngx_http_limit_conn_module module, which limits the number of connections per key, for example, the number of connections per IP address.

-- without-http_limit_req_module

Disable the build ngx_http_limit_req_module module, which limits the rate of request processing per key, for example, requests from a single IP address.

-- without-http_empty_gif_module

Disable building modules that emit single-pixel transparent GIF.

-- without-http_browser_module

Disable building the ngx_http_browser_module module, which creates variables whose value depends on the value of the "User-Agent" request header field.

-- without-http_upstream_hash_module

Disable building modules that implement the hash load balancing method.

-- without-http_upstream_ip_hash_module

Disable building modules that implement the ip_hash load balancing method.

-- without-http_upstream_least_conn_module

Disable building modules that implement the minimum_conn load balancing method.

-- without-http_upstream_keepalive_module

Disable building a module to provide caching of upstream server connections.

-- without-http_upstream_zone_module

Disable the build module, which stores the runtime state of the upstream group in the shared memory area.

-with-http_perl_module and-with-http_perl_module=dynamic

Support the construction of embedded Perl modules. This module is not built by default.

-- with-perl_modules_path=path

Define a directory that will retain the Perl module.

-- with-perl=path

Sets the name of the Perl binary file.

-- http-log-path=path

Sets the name of the main request log file for the HTTP server. After installation, nginx.conf can always use the access_log directive to change the file name in the configuration file. By default, the file name is prefix/logs/access.log.

-- http-client-body-temp-path=path

Defines the directory used to store temporary files that contain the body of the client request. After installation, nginx.conf can always use the client_body_temp_path directive to change the directory in the configuration file. By default, the directory name is prefix/client_body_temp.

-- http-proxy-temp-path=path

Define a directory to store temporary files that contain data received from a proxy server. After installation, nginx.conf can always use the proxy_temp_path directive to change the directory in the configuration file. By default, the directory name is prefix/proxy_temp.

-- http-fastcgi-temp-path=path

Define a directory to store temporary files that contain data received from the FastCGI server. After installation, nginx.conf can always use the fastcgi_temp_path directive to change the directory in the configuration file. By default, the directory name is prefix/fastcgi_temp.

-- http-uwsgi-temp-path=path

Define a directory to store temporary files with data received from the uwsgi server. After installation, nginx.conf can always use the uwsgi_temp_path directive to change the directory in the configuration file. By default, the directory name is prefix/uwsgi_temp.

-- http-scgi-temp-path=path

Define a directory to store temporary files with data received from the SCGI server. After installation, nginx.conf can always use the scgi_temp_path directive to change the directory in the configuration file. By default, the directory name is prefix/scgi_temp.

-- without-http

Disable the HTTP server.

-- without-http-cache

Disable HTTP caching.

-with-mail and-with-mail=dynamic

Enable the POP3 / IMAP4 / SMTP mail proxy server.

-- with-mail_ssl_module

Support for building a module that adds SSL / TLS protocol support to the mail proxy server. This module is not built by default. The OpenSSL library is required to build and run this module.

-- without-mail_pop3_module

Disable the POP3 protocol in the mail proxy server.

-- without-mail_imap_module

Disable the IMAP protocol in the mail proxy server.

-- without-mail_smtp_module

Disable the SMTP protocol in the mail proxy server.

-with-stream and-with-stream=dynamic

Support for building flow modules for generic TCP / UDP agents and load balancing. This module is not built by default.

-- with-stream_ssl_module

Support for building a module that adds SSL / TLS protocol support to the stream module. This module is not built by default. The OpenSSL library is required to build and run this module.

-- with-stream_realip_module

Enables the ability to build a ngx_stream_realip_module module that changes the client address to the address sent in the PROXY protocol header. This module is not built by default.

-with-stream_geoip_module and-with-stream_geoip_module=dynamic

Support for building a ngx_stream_geoip_module module that creates variables based on client IP addresses and precompiled MaxMind databases. This module is not built by default.

-- with-stream_ssl_preread_module

Support for building ngx_stream_ssl_preread_module modules that allow information to be extracted from ClientHello messages without terminating SSL / TLS. This module is not built by default.

-- without-stream_limit_conn_module

Disable building the ngx_stream_limit_conn_module module, which limits the number of connections per key, for example, the number of connections per IP address.

-- without-stream_access_module

Disable building the ngx_stream_access_module module, which allows you to restrict access to certain client addresses.

-- without-stream_geo_module

Disable building the ngx_stream_geo_module module, which creates a variable value that depends on the client IP address.

-- without-stream_map_module

Disable building the ngx_stream_map_module module, which creates variables whose values depend on the values of other variables.

-- without-stream_split_clients_module

Disable building the ngx_stream_split_clients_module module, which creates variables for A / B tests.

-- without-stream_return_module

Disable building the ngx_stream_return_module module, which sends some specified values to the client, and then closes the connection.

-- without-stream_upstream_hash_module

Disable building modules that implement the hash load balancing method.

-- without-stream_upstream_least_conn_module

Disable building modules that implement the minimum_conn load balancing method.

-- without-stream_upstream_zone_module

Disable the build module, which stores the runtime state of the upstream group in the shared memory area.

-- with-google_perftools_module

Allows you to build a ngx_google_perftools_module module that uses Google Performance Tools to analyze the performance of the nginx worker process. This module is intended for Nginx developers and is not built by default.

-- with-cpp_test_module

Enable the build ngx_cpp_test_module module.

-- add-module=path

Enable the external module.

-- add-dynamic-module=path

Enable the external dynamic module.

-- with-compat

Enable dynamic module compatibility.

-- with-cc=path

Sets the name of the C compiler.

-- with-cpp=path

Sets the name of the C preprocessor.

-- with-cc-opt=parameters

Set additional parameters that will be added to the CFLAGS variable. When using the system PCRE library under FreeBSD,-- with-cc-opt= "- I / usr/local/include" should be specified. If select () needs to increase the number of supported files, you can also specify it here, for example:-- with-cc-opt= "- D FD_SETSIZE=2048".

-- with-ld-opt=parameters

Set additional parameters that will be used during the link. When using the system PCRE library under FreeBSD,-- with-ld-opt= "- L / usr/local/lib" should be specified.

-- with-cpu-opt=cpu

Each specified CPU enables the building: pentium,pentiumpro, pentium3,pentium4, athlon,opteron, sparc32,sparc64, ppc64.

-- without-pcre

Disable the use of the PCRE library.

-- with-pcre

Force the use of the PCRE library.

-- with-pcre=path

Sets the path to the PCRE library source. You need to download and distribute the library distribution from the PCRE site (versions 4.4-8.43). The rest is done by nginx. / configure and finish make. This library is required for regular expression support and ngx_http_rewrite_module modules in location instructions.

-- with-pcre-opt=parameters

Set additional build options for PCRE.

-- with-pcre-jit

Build the PCRE library using the "compile just in time" support (1.1.12 dint pcreator jit directive).

-- with-zlib=path

Sets the path to the zlib library source. You need to download the library distribution (version 1.1.3-1.2.11) from the zlib site and extract it. The rest is done by nginx. / configure and finish make. The library is required for the ngx_http_gzip_module module.

-- with-zlib-opt=parameters

Set additional build options for zlib.

-- with-zlib-asm=cpu

Enables the use of an optimized zlib assembly source program in the specified CPU: pentium,pentiumpro.

-- with-libatomic

Force the use of the libatomic_ OPS library.

-- with-libatomic=path

Sets the path to the libatomic_ops library source.

-- with-openssl=path

Sets the path to the OpenSSL library source.

-- with-openssl-opt=parameters

Set additional build options for OpenSSL.

-- with-debug

Enable debug logging.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report