首页 |  我的博客 |  查看该博主内容分类 | 

unknown directive "real_ip_recursive" in /usr/local/nginx/conf/nginx.conf:91报错解决办法

报错

image

原因

real_ip_recursive on;的开启需要安装nginx模块http_realip_module

解决办法

重新配置安装nginx

./configure --prefix=/usr/local/nginx --with-http_ssl_module --with-http_realip_module

make && make install

提示:nginx -V可以查看原安装的配置

如果还是不行,将real_ip_recursive on;注释掉

posted @ 2022-10-24 14:04  Z哎呀  阅读(220)  评论(0)    收藏  举报