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

 

posted @ 2019-07-03 21:26  雪山上的蒲公英  阅读(5613)  评论(0)    收藏  举报
/* 返回顶部代码 */