nginx: [emerg] unknown directive "stub_status" in /home/oscf/nginx/conf/conf.d/ngx_metric.conf


解压安装过程命令如下:

cd /home/oscf     #该目录下有nginx压缩包
mkdir nginx
tar -zxvf nginx-1.16.0.tar.gz
cd nginx-1.16.0
./configure --prefix=/home/oscf/nginx     #指定安装目录
make
make install

当执行最后一步  make install 时,报错

nginx: [emerg] unknown directive "stub_status" in /home/oscf/nginx/conf/conf.d/ngx_metric.conf:

原因是Nginx没有添加modules/ngx_http_stub_status_module.o模块,导致安装失败。

解决方法:

在执行configure配置的一步时添加参数,命令如下

./configure --prefix=/home/oscf/nginx --with-http_stub_status_module

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM