0

我刚刚重新编译了 nginx 以添加 HttpStripModule 模块。(我跟着这个:https ://serverfault.com/a/279536/111652 )

这是我用来制作/制作安装的配置选项:

--conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --pid-path=/var/run/nginx.pid --lock-path=/var/lock/nginx.lock --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/body --http-proxy-temp-path=/var/lib/nginx/proxy --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --with-debug --with-http_stub_status_module --with-http_flv_module --with-http_ssl_module --with-http_dav_module --with-http_gzip_static_module --with-http_realip_module --with-mail --with-mail_ssl_module --with-ipv6 --add-module=/usr/src/gnosek-nginx-upstream-fair-5f6a3b7 --add-module=/usr/src/mod_strip

然后 make install 完成后,我重新启动了 nginx 并运行nginx -V ,输出为:

--conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --pid-path=/var/run/nginx.pid --lock-path=/var/lock/nginx.lock --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/body --http-proxy-temp-path=/var/lib/nginx/proxy --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --with-debug --with-http_stub_status_module --with-http_flv_module --with-http_ssl_module --with-http_dav_module --with-http_gzip_static_module --with-http_realip_module --with-mail --with-mail_ssl_module --with-ipv6 --add-module=/build/buildd/nginx-0.7.65/modules/nginx-upstream-fair

如您所见...它没有占用我的条形模块。:(

这里发生了什么?

更新:在这一切之后,我意识到我原来安装的 nginx 从未真正被替换过。

通过将 --sbin-path 标志指定到 nginx 的当前位置然后进行安装来解决此问题。然后文件实际上被覆盖了。现在启动nginx服务器后显示它是新版本。

4

2 回答 2

1

该模块可能包括在内。直到最近,nginx 的错误日志只能打印最多 2048 个字符的字符串,所以一个非常长的 ./configure 字符串在打印出来时会被截断。

于 2012-03-02T14:43:12.313 回答
0

指定--sbin-path配置命令也解决了我的问题。

于 2020-09-02T07:55:09.383 回答