2017-09-15 133 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