2017-09-15 132 views

回答

1

你的机器上运行nginx -V和你会看到,如果你的nginx的与该模块编译或不

的nginx -V

nginx的版本:nginx的/ 1.10.3(Ubuntu的) 使用OpenSSL 1.0.2g构建2016年3月1日 启用TLS SNI支持

配置参数:--with-cc-opt =' - g -O2 -fPIE -fstack-protector-strong -Wformat -Werror = format-security -Wdat e-time -D_FORTIFY_SOURCE = 2'--with-ld-opt =' - W1,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro -Wl,-z,now'--prefix =/usr/share/nginx --conf-path =/etc/nginx/nginx.conf --http-log-path =/var/log/nginx/access.log --error-log-path =/var/log/nginx/error.log --lock-path =/var/lock/nginx.lock --pid-path =/run/nginx.pid --http-client-body-temp-path =/var/lib/nginx/body - -http-fastcgi-temp-path =/var/lib/nginx/fastcgi --http-proxy-temp-path =/var/lib/nginx/proxy --http -script -temp path =/var/lib/nginx/scgi --http-uwsgi-temp-path =/var/lib/nginx/uwsgi --with-debug --with-pcre-jit --with-ipv6 --with-http_ssl_module --with-http_stub_status_module - 与-http_realip_module --with-http_auth_request_module --with-http_addition_module --with-http_dav_module --with-http_geoip_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_v2_module --with-http_sub_module - with-http_xslt_module --with-stream --with-stream_ssl_module --with-mail --with-mail_ssl_module --wit h-threads

上面是Ubuntu 16.04 LTS上的默认nginx。正如你可以看到默认情况下是一个与

编辑-1编译:默认模块

因此,有两件事情,当我们谈论默认模块。当你下载的源代码,只是在编译之前运行./configure

一个是。这将遵循nginx文档,这意味着如果文档说This module is not built by default, it should be enabled with the --with-http_gzip_static_module configuration parameter.。那么该模块将不会建立

第二个是当您在使用OS包管理器使用,让我们说sudo apt-get install -y nginx安装nginx的。这将附带Nginx文档中可能未指定为默认模块但在OS Nginx软件包分发中默认使用的模块。

+0

它不是我的配置上市...但我有时会看到这使得该** ** ngx_http_access_module是默认安装我的事情旗'--without-http_access_module',不是吗?我没有阻止任何IP地址,但让我无法确认... – zatziky

+0

'without'意味着接入模块丢失 –

+0

我会说'--without-http_access_module'使你的nginx忽略模块** ngx_http_access_module * *。 – zatziky