-./configure compile and install nginx parameters of the Detailed

Refer to the official documentation

 http://nginx.org/en/docs/configure.html

 Beginning with --with, default is disabled (not started, you want to use, then need to add at compile time)

 The beginning of the --without, default (when do not want to enable this module, you can add at compile time this parameter) enabled

 Compiled and installed Example (production from the posted down, nginx-1.16)

 

./configure --prefix=/etc/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --user=nginx --group=nginx --with-http_ssl_module --with-http_v2_module --with-http_dav_module --with-http_stub_status_module --with-threads --with-file-aio

 

 --prefix =  points to the installation directory.

 --sbin-path = Specifies the execution of the program file location.

 --modules-path = path designated third party storage module.

 --conf-path = specified configuration file storage location.

 --error-log-path = log storage location specified error.

 --pid-path = pid specified file location.

 --lock-path = file location specified lock.

 --user =  non-privileged user to specify the program is running.

 --group =  non-privileged user group to specify when the program runs.

 --builddir = points to the build directory.

 --with-rtsig_module enable rtsig module support.

 --with-select_module enable select module supports a polling approach is not recommended for use in high concurrency environments, disabled: - without-select_module.

 --with-poll_module enable the poll module supports the same functions and select, it is not recommended for use in high concurrency environments.

 --with-threads to enable thread pool support.

 --with-file-aio-enabled file aio support.

 --with-http_ssl_module enable https support.

 --with-http_v2_module enabled ngx_http_v2_module support.

 --with-ipv6 enable ipv6 support.

 --with-http_realip_module allowed to change from the request header in the client the ip address, the default is off.

 --with-http_addition_module enabled ngix_http_additon_mdoule support (as a filter output, in response to the request in portions).

 --with -http_xslt_module enabled ngx_http_xslt_module support, filtering XML conversion request.

 --with-http_image_filter_mdoule enabled ngx_http_image_filter_module support, transfer JPEG \ GIF \ PNG picture of a filter, not enabled by default, you need to install gd library.

 --with-http_geoip_module enabled ngx_http_geoip_module support for creating client-based MaxMind GeoIP binary file to match the client IP address ngx_http_geoip_module variables.

 --with-http_sub_module enabled ngx_http_sub_module support, allowing text to replace some nginx response in some other text.

 --with-http_dav_module enabled ngx_http_dav_module support, increase PUT, DELETE, MKCOL create a collection, COPY and MOVE methods, is off by default, you need to build on.

 --with-http_flv_module enabled ngx_http_flv_module support, seeks to provide a memory-based file offset of time.

 --with-http_mp4_module enabled ngx_http_mp4_module support, enable support for mp4 video file type.

 --with-http_gzip_static_module enabled ngx_http_gzip_static_module support, support online real-time compression output data stream.

 --with-http_random_index_module enabled ngx_http_random_index_module support, randomly selected from a directory index directory.

 --with-http_secure_link_module enabled ngx_http_secure_link_module support, calculation and inspection requirements necessary for a secure link URL.

 --with-http_degradation_module support enabled ngx_http_degradation_module allowed to return to 204 or 444 code under low memory conditions.

 --with-http_stub_status_module enable ngx_http_stub_status_module nginx supports viewing the status page.

 --without-http_charset_module ngx_http_charset_module disable this module, it can be converted between the character set, converted from other characters or other characters to be converted from UTF8 UTF8 into. It is only from server to client direction, only one-byte character can be converted.

 --without-http_gzip_module disabled ngx_http_gzip_module support, the same as --with-http_gzip_static_module function.

 --without-http_ssi_module disabled ngx_http_ssi_module support, provided at the input of a processing server comprises file (SSI) filter.

 --without-http_userid_module ngx_http_userid_module support disabled, the client module to determine cookies subsequent requests.

 --without-http_access_module disabled ngx_http_access_module support provides host-based access control ip address.

 --without-http_auth_basic_module disabled ngx_http_auth_basic_module support, you can use the user name and password authentication methods to authenticate the site or in part.

 --without-http_autoindex_module disabled ngx_http_authindex_module, the means for issuing a request when the index file is not found ngx_http_index_module module, to automatically generate a directory listing.

 --without-http_geo_module disabled ngx_http_geo_module support, this module is used to create a variable dependent on the client's ip.

 --without-http_map_module disabled ngx_http_map_module support, using an arbitrary key, the value of variable configuration settings.

 --without-http_split_clients_module disabled ngx_http_split_clients_module support, means for dividing the user based on the user ip address, header, cookies.

 --without-http_referer_module disabled ngx_http_referer_modlue support, the module is used to filter requests, Referer header value is not correct request.

 --without-http_rewrite_module disabled ngx_http_rewrite_module support. This module allows the use of regular expressions changed URI, and not to select the configuration according to the steering and variable. If this option is set at the server level, it will take effect before the location, location but if there are further rewrite rules, location rules section will still be executed. If this URI rewrite rules location because part of the cause, then the location will again be executed as part of a new URI, this cycle will be executed 10 times, the last returned a 500 error.

 --without-http_proxy_module disabled ngx_http_proxy_module support, http proxy function.

 --without-http_fastcgi_module disabled ngx_http_fastcgi_module support, the module allows interaction with nginx fastcgi process, and to control the fastcgi process works by passing parameters.

 --without-http_uwsgi_module disabled ngx_http_uwsgi_module support, the module for use uwsgi protocol, server related uwsgi.

 --without-http_scgi_module disabled ngx_http_scgi_module support, like fastcgi, but also with the application program interface standard http services.

 --without-http_memcached_module disabled ngx_http_memcached support, to provide simple caching to improve system efficiency.

 --without-http_limit_conn_module disabled ngx_http_limit_conn_module support, the module may be connected to the number of concurrent sessions is limited according to conditions.

 --without-http_limit_req_module disabled ngx_limit_req_module support, the module may be implemented for a limited number of requests address.

 --without-http_empty_gif_module disabled ngx_http_empty_gif_module support, the module resident transparent gif image a 1 * 1 in memory, can be very quickly called.

 --without-http_browser_module disabled ngx_http_browser_mdoule support, value creation depends on the request header. If the browser is a modern, then the value is equal to $ modern_browser modern_browser_value; and if the browser is old, equal to the $ ancient_browser $ ancient_browser_value command value allocated; if the browser is MSIE, MSIE equal to the $ 1.

 --without-http_upstream_ip_hash_module disabled ngx_http_upstream_ip_hash_module support, the module for simple load balancing.

 --with-http_perl_module enabled ngx_http_perl_module support, nginx can use it to make calls perl perl directly or through ssi.

 --with-perl_modules_path = path setting module perl

 --with-perl = perl library file path setting

 --http-log-path = path setting access log

 --http-client-body-temp-path = http client request to set temporary file path

 --http-proxy-temp-path = http proxy setting temporary file path

 --http-fastcgi-temp-path = http fastcgi set temporary file path

 --http-uwsgi-temp-path = http scgi set temporary file path

 --http-scgi-temp-path = http scgi set temporary file path

 --without-http disable the http server function

 --without-http-cache disable http cache function

 --with-mail-enabled POP3, IMAP4, SMTP proxy module

 --with-mail_ssl_module support enabled ngx_mail_ssl_module

 --without-mail_pop3_module disabled pop3 protocol.

 --without-mail_iamp_module disabled iamp agreement.

 --without-mail_smtp_module disabled smtp protocol.

 --with-google_perftools_module enabled ngx_google_perftools_mdoule support, debugging can be used to analyze performance bottlenecks.

 --with-cpp_test_module enabled ngx_cpp_test_module support.

 --add-module = path specifies the external module, enable support for external modules.

 --with-cc = C compiler directed path.

 --with-cpp = C preprocessor directed path.

 --with-cc-opt = C compiler provided parameter specifies --with-cc-opt = "- I / usr / lcal / include", if the use of select () function, but also need to specify the number of file - -with-cc-opt = "- D FD_SETSIZE = 2048". (PCRE library)

 --with-ld-opt = Connected file parameters specify --with-ld-opt = "- L / usr / local / lib". (PCRE library)

 --with-cpu-opt = compiled CPU type specified, such as pentium, pentiumpro, ... amd64, ppc64 ...

 --without-pcre disable the pcre library.

 --with-pcre pcre library enabled.

 --with-pcre = point pcre library directory.

 --with-pcre-opt = pcre library to set additional parameters at compile time.

 --with-md5 = md5 point to library files directory.

 --with-md5-opt additional parameters to set the library md5 = compile time.

 --with-md5-asm use md5 assembler source.

 --with-sha1 = sha1 point to library files directory.

 --with-sha1-opt additional parameters to set the library sha1 = compile time.

 --with-sha1-asm use sha1 assembler source.

 --with-zlib = point zlib library directory.

 --with-zlib-opt = zlib to set additional parameters at compile time.

 --with-zlib-asm = CPU for the specified source assembler optimization.

 --with-libatomic provide a framework for the realization of the memory updating operation atoms.

 --with-libatomic = libatomic_ops point of installation directory.

 --with-openssl = openssl point installation directory.

 --with-openssl-opt = openssl provided as additional parameters at compile time.

 --with-debug Enable debug log.

3. Default with or without options

Option (Function)

with

without

default

prefix

N/A

N/A

/usr/local/nginx

sbin-path

N/A

N/A

prefix/sbin/nginx

conf-path

N/A

N/A

prefix/conf/nginx.conf

pid-path

N/A

N/A

prefix/logs/nginx.pid

error-log-path

N/A

N/A

prefix/logs/error.log

http-log-path

N/A

N/A

prefix/logs/access.log

user

N/A

N/A

nobody

group

N/A

N/A

nobody

select_module

with

without

If the platform does not support kqueue, epoll, / dev / poll, it will be automatically selected as a transaction mode

poll_module

with

without

If the platform does not support kqueue, epoll, / dev / poll, it will be automatically selected as a transaction mode

file_aio

with

N/A

shut down

ipv6

with

N/A

shut down

http_ssl_module

with

N/A

shut down

http_realip_module

with

N/A

shut down

http_addition_module

with

N/A

shut down

http_xslt_module

with

N/A

shut down

http_image_filter_module

with

N/A

shut down

http_geoip_module

with

N/A

shut down

http_sub_module

with

N/A

shut down

http_dav_module

with

N/A

shut down

http_flv_module

with

N/A

shut down

http_gzip_static_module

with

N/A

shut down

http_random_index_module

with

N/A

shut down

http_secure_link_module

with

N/A

shut down

http_degradation_module

with

N/A

shut down

http_stub_status_module

with

N/A

shut down

http_charset_module

N/A

without

Enable

http_gzip_module

N/A

without

Enable

http_ssi_module

N/A

without

Enable

http_userid_module

N/A

without

Enable

http_access_module

N/A

without

Enable

http_auth_basic_module

N/A

without

Enable

http_autoindex_module

N/A

without

Enable

http_geo_module

N/A

without

Enable

http_map_module

N/A

without

Enable

http_split_clients_module

N/A

without

Enable

http_referer_module

N/A

without

Enable

http_rewrite_module

N/A

without

Enable

http_proxy_module

N/A

without

Enable

http_fastcgi_module

N/A

without

Enable

http_uwsgi_module

N/A

without

Enable

http_scgi_module

N/A

without

Enable

http_memcached_module

N/A

without

Enable

http_limit_conn_module

N/A

without

Enable

http_limit_req_module

N/A

without

Enable

http_empty_gif_module

N/A

without

Enable

http_brower_module

N/A

without

Enable

http_upstream_ip_hash_module

N/A

without

Enable

http_perl_module

with

N/A

Disable

http

N/A

without

Enable

http-cache

N/A

without

Enable

mail

with

N/A

Disable

pcre

with

without

N/A

stream

with

N/A

Disable

Guess you like

Origin www.cnblogs.com/a-s-m/p/11301314.html