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

Extracting installation procedure command is as follows:

CD / Home / OSCF      # has compressed the directory nginx 
mkdir nginx 
the tar -zxvf nginx-1.16 .0.tar.gz 
CD nginx -1.16 .0 
. / Configure --prefix = / Home / OSCF / nginx      # specify the installation directory 
the make 
the make install

When the final step make install, an error

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

Nginx is no reason to add modules / ngx_http_stub_status_module.o module, the installation fails.

Solution:

When you add a step in the execution configure configuration parameters, the following command

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

 

Guess you like

Origin www.cnblogs.com/zjfjava/p/11129205.html