Nginx configure 详解

本文将介绍Nginx在进行源码编译安装过程中我们怎样使用 configure 去配置我们自己的Nginx。

本文是根据Nginx官网 https://nginx.org/en/docs/configure.html 配置教程使用词典翻译过来,英语水平有限只能简单翻译,有错勿喷。

使用 configure 命令配置构建。它定义了系统的各个方面,包括 Nginx 允许用于连接处理的方法。最后,它创建一个 Makefile。

Nginx 可以通过 configure 选项来启用(--without-)或禁用(--with-)模块,分别如下:

--with- 启用模块

该类前缀的模块表示默认并不会编译到nginx中,如果我们要将某个模块编译到nginx,需要添加 --with- 即可。例如:--with-http_ssl_module 默认nginx是不会编译 http-ssl 模块到 nginx中;如果要添加该模块,命令如下:

[root@S0 nginx-1.16.1]# ./configure --with-http_ssl_module

--without- 禁用模块

该类前缀模块默认是会编译到我们的Nginx;如果我们不想要某个模块,只需要添加 --without- 即可。例如:--without-http_gzip_module 默认 nginx 是将 gzip 模块编译到 nginx 中的;如果要去除该模块,命令如下:

[root@S0 nginx-1.16.1]# ./configure --without-http_gzip_module

这样就将 gzip 模块排除了。

Example of parameters usage (all of this needs to be typed in one 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-pcre=../pcre-8.43
   --with-zlib=../zlib-1.2.11

After configuration, nginx is compiled and installed using make.

配置完成后,使用 make 编译并安装 nginx。

configure 命令支持以下参数:

--help

prints a help message.

打印帮助信息。

--prefix=path

defines a directory that will keep server files. This same directory will also be used for all relative paths set by configure (except for paths to libraries sources) and in the nginx.conf configuration file. It is set to the /usr/local/nginx directory by default.

定义保存服务器文件的目录。这个目录还将用于 configure(除了指向库源的路径)和 nginx.conf 配置文件中设置的所有相对路径。

--sbin-path=path

sets the name of an nginx executable file. This name is used only during installation. By default the file is named prefix/sbin/nginx.

设置 nginx 可执行文件的名称。此名称仅在安装期间使用。默认情况下,文件名为 prefix/sbin/nginx。

--modules-path=path

defines a directory where nginx dynamic modules will be installed. By default the prefix/modules directory is used.

定义将安装nginx动态模块的目录。默认情况下使用 prefix/modules 目录。

--conf-path=path

sets the name of an nginx.conf configuration file. If needs be, nginx can always be started with a different configuration file, by specifying it in the command-line parameter -c file. By default the file is named prefix/conf/nginx.conf.

设置 nginx.conf 配置文件的名称。如果需要,nginx总是可以通过在命令行参数 -c 指定一个不同的配置文件来启动。默认情况下,文件名为 prefix/conf/nginx.conf。

--error-log-path=path

sets the name of the primary error, warnings, and diagnostic file. After installation, the file name can always be changed in the nginx.conf configuration file using the error_log directive. By default the file is named prefix/logs/error.log.

设置主要错误、警告和诊断文件的名称。安装之后,可以使用 error_log 指令在 nginx.conf 配置文件中更改文件名。默认情况下,文件名为 prefix/logs/error.log。

--pid-path=path

sets the name of an nginx.pid file that will store the process ID of the main process. After installation, the file name can always be changed in the nginx.conf configuration file using the piddirective. By default the file is named prefix/logs/nginx.pid.

设置 nginx.pid 文件的名称。pid文件它将存储主进程的进程ID。安装之后,总是可以使用 piddirective 在 nginx.conf 配置文件中更改文件名。默认情况下,文件名为 prefix/logs/nginx.pid。

--lock-path=path

sets a prefix for the names of lock files. After installation, the value can always be changed in thenginx.conf configuration file using the lock_file directive. By default the value is prefix/logs/nginx.lock.

为锁定文件的名称设置前缀。安装之后,可以使用 lock_file 指令在 thenginx.conf 配置文件中更改该值。默认值是 prefix/logs/nginx.lock。

--user=name

sets the name of an unprivileged user whose credentials will be used by worker processes. After installation, the name can always be changed in the nginx.conf configuration file using the userdirective. The default user name is nobody.

设置工作进程将使用其凭据的无特权用户的名称。安装之后,可以使用 userdirective 在 nginx.conf 配置文件中更改名称。默认的用户名是 nobody。

--group=name

sets the name of a group whose credentials will be used by worker processes. After installation, the name can always be changed in the nginx.conf configuration file using the user directive. By default, a group name is set to the name of an unprivileged user.

设置工作进程将使用其凭据的组的名称。安装之后,可以使用 user 指令在 nginx.conf 配置文件中更改名称。默认情况下,组名设置为无特权用户的名称。

--build=name

sets an optional nginx build name.

设置一个可选的nginx构建名。

--builddir=path

sets a build directory.

设置生成目录。

--with-select_module
--without-select_module

enables or disables building a module that allows the server to work with the select() method. This module is built automatically if the platform does not appear to support more appropriate methods such as kqueue, epoll, or /dev/poll.

--with-poll_module
--without-poll_module

enables or disables building a module that allows the server to work with the poll() method. This module is built automatically if the platform does not appear to support more appropriate methods such as kqueue, epoll, or /dev/poll.

启用或禁用构建允许服务器使用poll()方法的模块。如果平台不支持更合适的方法,如kqueue、epoll或/dev/poll,则自动构建此模块。

--with-threads

enables the use of thread pools.

启用线程池的使用。

--with-file-aio

enables the use of asynchronous file I/O (AIO) on FreeBSD and Linux.

支持在FreeBSD和Linux上使用异步文件I/O (AIO)。

--with-http_ssl_module

enables building a module that adds the HTTPS protocol support to an HTTP server. This module is not built by default. The OpenSSL library is required to build and run this module.

启用构建模块,将HTTPS协议支持添加到HTTP服务器。默认情况下不构建此模块。构建和运行此模块需要OpenSSL库。

--with-http_v2_module

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

支持构建支持HTTP/2的模块。默认情况下不构建此模块。

--with-http_realip_module

enables building the 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.

启用生成ngx_http_realip_module模块,该模块将客户端地址更改为在指定头字段中发送的地址。默认情况下不构建此模块。

--with-http_addition_module

enables building the ngx_http_addition_module module that adds text before and after a response. This module is not built by default.

支持构建ngx_http_addition_module模块,该模块在响应前后添加文本。默认情况下不构建此模块。

--with-http_xslt_module
--with-http_xslt_module=dynamic

enables building the ngx_http_xslt_module module that transforms XML responses using one or more XSLT stylesheets. This module is not built by default. The libxml2 and libxslt libraries are required to build and run this module.

启用构建ngx_http_xslt_module模块,该模块使用一个或多个XSLT样式表转换XML响应。默认情况下不构建此模块。构建和运行此模块需要libxml2和libxslt库。

--with-http_image_filter_module
--with-http_image_filter_module=dynamic

enables building the ngx_http_image_filter_module module that transforms images in JPEG, GIF, PNG, and WebP formats. This module is not built by default.

支持构建ngx_http_image_filter_module模块,该模块转换JPEG、GIF、PNG和WebP格式的图像。默认情况下不构建此模块。

--with-http_geoip_module
--with-http_geoip_module=dynamic

enables building the ngx_http_geoip_module module that creates variables depending on the client IP address and the precompiled MaxMind databases. This module is not built by default.

支持构建ngx_http_geoip_module模块,该模块根据客户端IP地址和预编译的MaxMind数据库创建变量。默认情况下不构建此模块。

--with-http_sub_module

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

启用构建ngx_http_sub_module模块,该模块通过替换一个指定的字符串来修改响应。默认情况下不构建此模块。

--with-http_dav_module

enables building the ngx_http_dav_module module that provides file management automation via the WebDAV protocol. This module is not built by default.

支持构建ngx_http_dav_module模块,该模块通过WebDAV协议提供文件管理自动化。默认情况下不构建此模块。

--with-http_flv_module

enables building the ngx_http_flv_module module that provides pseudo-streaming server-side support for Flash Video (FLV) files. This module is not built by default.

支持构建ngx_http_flv_module模块,该模块为Flash视频(FLV)文件提供伪流服务器端支持。默认情况下不构建此模块。

--with-http_mp4_module

enables building the ngx_http_mp4_module module that provides pseudo-streaming server-side support for MP4 files. This module is not built by default.

支持构建ngx_http_mp4_module模块,该模块为MP4文件提供伪流服务器端支持。默认情况下不构建此模块。

--with-http_gunzip_module

enables building the ngx_http_gunzip_module module that decompresses responses with “Content-Encoding: gzip” for clients that do not support “gzip” encoding method. This module is not built by default.

支持为不支持“gzip”编码方法的客户机构建ngx_http_gunzip_module模块,该模块使用“Content-Encoding: gzip”解压响应。默认情况下不构建此模块。

--with-http_gzip_static_module

enables building the ngx_http_gzip_static_module module that enables sending precompressed files with the “.gz” filename extension instead of regular files. This module is not built by default.

支持构建ngx_http_gzip_static_module模块,该模块支持使用“.gz”发送预压缩文件。文件名扩展名,而不是普通文件。默认情况下不构建此模块。

--with-http_auth_request_module

enables building the ngx_http_auth_request_module module that implements client authorization based on the result of a subrequest. This module is not built by default.

支持构建ngx_http_auth_request_module模块,该模块基于子请求的结果实现客户端授权。默认情况下不构建此模块。

--with-http_random_index_module

enables building the ngx_http_random_index_module module that processes requests ending with the slash character (‘/’) and picks a random file in a directory to serve as an index file. This module is not built by default.

支持构建ngx_http_random_index_module模块,该模块处理以斜杠字符(' / ')结尾的请求,并在目录中选择一个随机文件作为索引文件。默认情况下不构建此模块。

--with-http_secure_link_module

enables building the ngx_http_secure_link_module module. This module is not built by default.

启用生成ngx_http_secure_link_module模块。默认情况下不构建此模块。

--with-http_degradation_module

enables building the ngx_http_degradation_module module. This module is not built by default.

支持构建ngx_http_degradation_module模块。默认情况下不构建此模块。

--with-http_slice_module

enables building the ngx_http_slice_module module that splits a request into subrequests, each returning a certain range of response. The module provides more effective caching of big responses. This module is not built by default.

支持构建ngx_http_slice_module模块,该模块将请求拆分为子请求,每个子请求返回一定范围的响应。该模块提供了更有效的大响应缓存。默认情况下不构建此模块。

--with-http_stub_status_module

enables building the ngx_http_stub_status_module module that provides access to basic status information. This module is not built by default.

支持构建ngx_http_stub_status_module模块,该模块提供对基本状态信息的访问。默认情况下不构建此模块。

--without-http_charset_module

disables building the ngx_http_charset_module module that adds the specified charset to the “Content-Type” response header field and can additionally convert data from one charset to another.

禁用生成ngx_http_charset_module模块,该模块将指定的charset添加到“Content-Type”响应头字段中,并可以将数据从一个charset转换为另一个charset。

--without-http_gzip_module

disables building a module that compresses responses of an HTTP server. The zlib library is required to build and run this module.

禁用构建压缩HTTP服务器响应的模块。构建和运行此模块需要zlib库。

--without-http_ssi_module

disables building the ngx_http_ssi_module module that processes SSI (Server Side Includes) commands in responses passing through it.

禁用生成ngx_http_ssi_module模块,该模块处理通过它的响应中的SSI(服务器端包含)命令。

--without-http_userid_module

disables building the ngx_http_userid_module module that sets cookies suitable for client identification.

禁用生成ngx_http_userid_module模块,该模块设置适合于客户端标识的cookie。

--without-http_access_module

disables building the ngx_http_access_module module that allows limiting access to certain client addresses.

禁用生成ngx_http_access_module模块,该模块允许限制对某些客户端地址的访问。

--without-http_auth_basic_module

disables building the ngx_http_auth_basic_module module that allows limiting access to resources by validating the user name and password using the “HTTP Basic Authentication” protocol.

禁用构建ngx_http_auth_basic_module模块,该模块允许使用“HTTP基本身份验证”协议验证用户名和密码,从而限制对资源的访问。

--without-http_mirror_module

disables building the ngx_http_mirror_module module that implements mirroring of an original request by creating background mirror subrequests.

禁用构建ngx_http_mirror_module模块,该模块通过创建后台镜像子请求来实现对原始请求的镜像。

--without-http_autoindex_module

disables building the ngx_http_autoindex_module module that processes requests ending with the slash character (‘/’) and produces a directory listing in case the ngx_http_index_module module cannot find an index file.

禁用生成ngx_http_autoindex_module模块,该模块处理以斜杠字符(' / ')结尾的请求,并在ngx_http_index_module模块无法找到索引文件时生成目录清单。

--without-http_geo_module

disables building the ngx_http_geo_module module that creates variables with values depending on the client IP address.

禁用构建ngx_http_geo_module模块,该模块根据客户端IP地址创建具有值的变量。

--without-http_map_module

disables building the ngx_http_map_module module that creates variables with values depending on values of other variables.

禁用构建ngx_http_map_module模块,该模块根据其他变量的值创建具有值的变量。

--without-http_split_clients_module

disables building the ngx_http_split_clients_module module that creates variables for A/B testing.

禁用构建ngx_http_split_clients_module模块,该模块为A/B测试创建变量。

--without-http_referer_module

disables building the ngx_http_referer_module module that can block access to a site for requests with invalid values in the “Referer” header field.

禁用生成ngx_http_referer_module模块,该模块可以阻止对“Referer”头字段中值无效的请求访问站点。

--without-http_rewrite_module

disables building a module that allows an HTTP server to redirect requests and change URI of requests. The PCRE library is required to build and run this module.

禁用构建允许HTTP服务器重定向请求和更改请求URI的模块。构建和运行此模块需要PCRE库。

--without-http_proxy_module

disables building an HTTP server proxying module.

禁用构建HTTP服务器代理模块。

--without-http_fastcgi_module

disables building the ngx_http_fastcgi_module module that passes requests to a FastCGI server.

禁用生成ngx_http_fastcgi_module模块,该模块将请求传递给FastCGI服务器。

--without-http_uwsgi_module

disables building the ngx_http_uwsgi_module module that passes requests to a uwsgi server.

禁用生成ngx_http_uwsgi_module模块,该模块将请求传递给uwsgi服务器。

--without-http_scgi_module

disables building the ngx_http_scgi_module module that passes requests to an SCGI server.

禁用生成ngx_http_scgi_module模块,该模块将请求传递给SCGI服务器。

--without-http_grpc_module

disables building the ngx_http_grpc_module module that passes requests to a gRPC server.

禁用生成ngx_http_grpc_module模块,该模块将请求传递给gRPC服务器。

--without-http_memcached_module

disables building the ngx_http_memcached_module module that obtains responses from a memcached server.

禁用生成从memcached服务器获取响应的ngx_http_memcached_module模块。

--without-http_limit_conn_module

disables building the ngx_http_limit_conn_module module that limits the number of connections per key, for example, the number of connections from a single IP address.

禁用生成ngx_http_limit_conn_module模块,该模块限制每个键的连接数,例如,来自单个IP地址的连接数。

--without-http_limit_req_module

disables building the ngx_http_limit_req_module module that limits the request processing rate per key, for example, the processing rate of requests coming from a single IP address.

禁用构建ngx_http_limit_req_module模块,该模块限制每个键的请求处理速度,例如,来自单个IP地址的请求的处理速度。

--without-http_empty_gif_module

disables building a module that emits single-pixel transparent GIF.

禁用生成发出单像素透明GIF的模块。

--without-http_browser_module

disables building the ngx_http_browser_module module that creates variables whose values depend on the value of the “User-Agent” request header field.

禁用构建ngx_http_browser_module模块,该模块创建的变量的值依赖于“User-Agent”请求头字段的值。

--without-http_upstream_hash_module

disables building a module that implements the hash load balancing method.

禁用构建实现散列负载平衡方法的模块。

--without-http_upstream_ip_hash_module

disables building a module that implements the ip_hash load balancing method.

禁用实现ip_hash负载平衡方法的模块。

--without-http_upstream_least_conn_module

disables building a module that implements the least_conn load balancing method.

禁用构建实现least_conn负载平衡方法的模块。

--without-http_upstream_keepalive_module

disables building a module that provides caching of connections to upstream servers.

禁用构建模块,该模块提供到上游服务器的连接缓存。

--without-http_upstream_zone_module

disables building a module that makes it possible to store run-time state of an upstream group in a shared memory zone.

禁用构建模块,该模块使在共享内存区域中存储上游组的运行时状态成为可能。

--with-http_perl_module
--with-http_perl_module=dynamic

enables building the embedded Perl module. This module is not built by default.

支持构建嵌入式Perl模块。默认情况下不构建此模块。

--with-perl_modules_path=path

defines a directory that will keep Perl modules.

定义一个保存Perl模块的目录。

--with-perl=path

sets the name of the Perl binary.

设置Perl二进制文件的名称。

--http-log-path=path

sets the name of the primary request log file of the HTTP server. After installation, the file name can always be changed in the nginx.conf configuration file using the access_log directive. By default the file is named prefix/logs/access.log.

设置HTTP服务器的主请求日志文件的名称。安装之后,总是可以使用access_log指令在nginx.conf配置文件中更改文件名。默认情况下,文件名为prefix/logs/access.log。

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

defines a directory for storing temporary files that hold client request bodies. After installation, the directory can always be changed in the nginx.conf configuration file using theclient_body_temp_path directive. By default the directory is named prefix/client_body_temp.

定义一个目录,用于存储保存客户端请求主体的临时文件。安装之后,可以使用theclient_body_temp_path指令在nginx.conf配置文件中更改目录。默认情况下,目录名为prefix/client_body_temp。

--http-proxy-temp-path=path

defines a directory for storing temporary files with data received from proxied servers. After installation, the directory can always be changed in the nginx.conf configuration file using theproxy_temp_path directive. By default the directory is named prefix/proxy_temp.

定义一个目录,用于存储从代理服务器接收到的数据的临时文件。安装之后,可以使用proxy_temp_path指令在nginx.conf配置文件中更改目录。默认情况下,目录名为prefix/proxy_temp。

--http-fastcgi-temp-path=path

defines a directory for storing temporary files with data received from FastCGI servers. After installation, the directory can always be changed in the nginx.conf configuration file using thefastcgi_temp_path directive. By default the directory is named prefix/fastcgi_temp.

定义一个目录,用于存储从FastCGI服务器接收到的数据的临时文件。安装之后,可以使用fastcgi_temp_path指令在nginx.conf配置文件中更改目录。默认情况下,目录名为prefix/fastcgi_temp。

--http-uwsgi-temp-path=path

defines a directory for storing temporary files with data received from uwsgi servers. After installation, the directory can always be changed in the nginx.conf configuration file using theuwsgi_temp_path directive. By default the directory is named prefix/uwsgi_temp.

定义一个目录,用于存储从uwsgi服务器接收到的数据的临时文件。安装之后,可以使用uwsgi_temp_path指令在nginx.conf配置文件中更改目录。默认情况下,目录名为prefix/uwsgi_temp。

--http-scgi-temp-path=path

defines a directory for storing temporary files with data received from SCGI servers. After installation, the directory can always be changed in the nginx.conf configuration file using thescgi_temp_path directive. By default the directory is named prefix/scgi_temp.

定义一个目录,用于存储从SCGI服务器接收到的数据的临时文件。安装之后,目录总是可以在nginx.conf配置文件中使用thescgi_temp_path指令进行更改。默认情况下,目录名为prefix/scgi_temp。

--without-http

disables the HTTP server.

禁用HTTP服务。

--without-http-cache

disables HTTP cache.

禁用HTTP缓存。

--with-mail
--with-mail=dynamic

enables POP3/IMAP4/SMTP mail proxy server.

启用POP3/IMAP4/SMTP邮件代理服务器。

--with-mail_ssl_module

enables building a module that adds the 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.

启用构建模块,将SSL/TLS协议支持添加到邮件代理服务器。默认情况下不构建此模块。构建和运行此模块需要OpenSSL库。

--without-mail_pop3_module

disables the POP3 protocol in mail proxy server.

禁用邮件代理服务器中的POP3协议。

--without-mail_imap_module

disables the IMAP protocol in mail proxy server.

禁用邮件代理服务器中的IMAP协议。

--without-mail_smtp_module

disables the SMTP protocol in mail proxy server.

禁用邮件代理服务器中的SMTP协议。

--with-stream
--with-stream=dynamic

enables building the stream module for generic TCP/UDP proxying and load balancing. This module is not built by default.

启用为通用TCP/UDP代理和负载平衡构建流模块。默认情况下不构建此模块。

--with-stream_ssl_module

enables building a module that adds the 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.

允许构建一个模块,将SSL/TLS协议支持添加到流模块。默认情况下不构建此模块。构建和运行此模块需要OpenSSL库。

--with-stream_realip_module

enables building the 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.

支持构建ngx_stream_realip_module模块,该模块将客户端地址更改为在代理协议头中发送的地址。默认情况下不构建此模块。

--with-stream_geoip_module
--with-stream_geoip_module=dynamic

enables building the ngx_stream_geoip_module module that creates variables depending on the client IP address and the precompiled MaxMind databases. This module is not built by default.

支持构建ngx_stream_geoip_module模块,该模块根据客户端IP地址和预编译的MaxMind数据库创建变量。默认情况下不构建此模块。

--with-stream_ssl_preread_module

enables building the ngx_stream_ssl_preread_module module that allows extracting information from the ClientHello message without terminating SSL/TLS. This module is not built by default.

支持构建ngx_stream_ssl_preread_module模块,该模块允许在不终止SSL/TLS的情况下从ClientHello消息中提取信息。默认情况下不构建此模块。

--without-stream_limit_conn_module

disables building the ngx_stream_limit_conn_module module that limits the number of connections per key, for example, the number of connections from a single IP address.

禁用构建ngx_stream_limit_conn_module模块,该模块限制每个键的连接数,例如,来自单个IP地址的连接数。

--without-stream_access_module

disables building the ngx_stream_access_module module that allows limiting access to certain client addresses.

禁用生成ngx_stream_access_module模块,该模块允许限制对某些客户端地址的访问。

--without-stream_geo_module

disables building the ngx_stream_geo_module module that creates variables with values depending on the client IP address.

禁用构建ngx_stream_geo_module模块,该模块根据客户端IP地址创建具有值的变量。

--without-stream_map_module

disables building the ngx_stream_map_module module that creates variables with values depending on values of other variables.

禁用构建ngx_stream_map_module模块,该模块创建的变量的值依赖于其他变量的值。

--without-stream_split_clients_module

disables building the ngx_stream_split_clients_module module that creates variables for A/B testing.

禁用构建ngx_stream_split_clients_module模块,该模块为A/B测试创建变量。

--without-stream_return_module

disables building the ngx_stream_return_module module that sends some specified value to the client and then closes the connection.

禁用生成ngx_stream_return_module模块,该模块向客户机发送一些指定值,然后关闭连接。

--without-stream_upstream_hash_module

disables building a module that implements the hash load balancing method.

禁用构建实现散列负载平衡方法的模块。

--without-stream_upstream_least_conn_module

disables building a module that implements the least_conn load balancing method.

禁用构建实现least_conn负载平衡方法的模块。

--without-stream_upstream_zone_module

disables building a module that makes it possible to store run-time state of an upstream group in a shared memory zone.

禁用构建模块,该模块使在共享内存区域中存储上游组的运行时状态成为可能。

--with-google_perftools_module

enables building the ngx_google_perftools_module module that enables profiling of nginx worker processes using Google Performance Tools. The module is intended for nginx developers and is not built by default.

支持构建ngx_google_perftools_module模块,该模块支持使用谷歌性能工具分析nginx工作进程。该模块是为nginx开发人员设计的,默认情况下不构建。

--with-cpp_test_module

enables building the ngx_cpp_test_module module.

启用生成ngx_cpp_test_module模块。

--add-module=path

enables an external module.

启用外部模块。

--add-dynamic-module=path

enables an external dynamic module.

启用外部动态模块。

--with-compat

enables dynamic modules compatibility.

启用动态模块兼容性。

--with-cc=path

sets the name of the C compiler.

设置C编译器的名称。

--with-cpp=path

sets the name of the C preprocessor.

设置C预处理器的名称。

--with-cc-opt=parameters

sets 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 the number of files supported by select() needs to be increased it can also be specified here such as this: --with-cc-opt="-D FD_SETSIZE=2048".

设置将添加到CFLAGS变量的其他参数。当使用FreeBSD下的系统PCRE库时,应该指定——with-cc-opt="-I /usr/local/include"。如果select()支持的文件数量需要增加,也可以在这里指定,比如:-with-cc-opt="-D FD_SETSIZE=2048"。

--with-ld-opt=parameters

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

设置将在链接期间使用的其他参数。在使用FreeBSD下的系统PCRE库时,应该指定——with-ld-opt="-L /usr/local/lib"。

--with-cpu-opt=cpu

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

支持为每个指定CPU构建:pentium、pentiumpro、pentium3、pentium4、athlon、opteron、sparc32、sparc64、ppc64。

--without-pcre

disables the usage of the PCRE library.

禁用PCRE库的使用。

--with-pcre

forces the usage of the PCRE library.

强制使用PCRE库。

--with-pcre=path

sets the path to the sources of the PCRE library. The library distribution (version 4.4 — 8.43) needs to be downloaded from the PCRE site and extracted. The rest is done by nginx’s ./configure andmake. The library is required for regular expressions support in the location directive and for thengx_http_rewrite_module module.

设置到PCRE库源的路径。库分发版(版本4.4 - 8.43)需要从PCRE站点下载并提取。剩下的工作由nginx ./configure andmake完成。location指令和thengx_http_rewrite_module模块中的正则表达式支持都需要这个库。

--with-pcre-opt=parameters

sets additional build options for PCRE.

为PCRE设置附加的构建选项。

--with-pcre-jit

builds the PCRE library with “just-in-time compilation” support (1.1.12, the pcre_jit directive).

使用“即时编译”支持构建PCRE库(1.1.12,pcre_jit指令)。

--with-zlib=path

sets the path to the sources of the zlib library. The library distribution (version 1.1.3 — 1.2.11) needs to be downloaded from the zlib site and extracted. The rest is done by nginx’s ./configureand make. The library is required for the ngx_http_gzip_module module.

设置指向zlib库源的路径。库发行版(版本1.1.3 - 1.2.11)需要从zlib站点下载并提取。其余部分由nginx 's ./configureand make完成。ngx_http_gzip_module模块需要这个库。

--with-zlib-opt=parameters

sets additional build options for zlib.

为zlib设置其他构建选项。

--with-zlib-asm=cpu

enables the use of the zlib assembler sources optimized for one of the specified CPUs: pentium, pentiumpro.

启用为指定cpu之一(pentium, pentiumpro)优化的zlib汇编程序源代码。

--with-libatomic

forces the libatomic_ops library usage.

强制使用libatomic_ops库。

--with-libatomic=path

sets the path to the libatomic_ops library sources.

设置到libatomic_ops库源的路径。

--with-openssl=path

sets the path to the OpenSSL library sources.

设置到OpenSSL库源代码的路径。

--with-openssl-opt=parameters

sets additional build options for OpenSSL.

为OpenSSL设置附加的构建选项。

--with-debug

enables the debugging log.

启用调试日志。

业精于勤,荒于嬉。——韩愈《进学解》
0 不喜欢
说说我的看法 -
全部评论(
没有评论
关于
本网站属于个人的非赢利性网站,转载的文章遵循原作者的版权声明,如果原文没有版权声明,请来信告知:hxstrive@outlook.com
公众号