
nginx: [emerg] unknown directive "set_real_ip_from"的解决方法
出现nginx: [emerg] unknown directive "set_real_ip_from"
是因为nginx缺少了realip模块
重新添加realip模块编译即可。。。
1
2
3
4
5
6
7
8
9
10
11
12
./configure --prefix=/usr/local/nginx --user=www-data --group=www-data --pid-path=/var/run/ginx.pid \
--with-http_ssl_module \
--with-http_v2_module \
--with-http_v3_module \
--with-http_stub_status_module \
--with-http_gzip_static_module \
--with-http_realip_module \
--add-module=/opt/ngx_brotli \
--with-openssl=../quiche/deps/boringssl \
--with-quiche=../quiche \
--with-pcre=/opt/pcre-8.44 \
--with-zlib=/opt/zlib-1.2.11
记得添加--with-http_realip_module
模块
如果nginx已经上线,只需要执行make
即可,然后备份旧的nginx进程文件,
把编译好新的nginx二进制文件复制到nginx安装sbin目录下即可
💘 相关文章
- nginx: [emerg] Solution to unknown directive "set_real_ip_from"
- nginx nginx "--with-ipv6" option is deprecated 问题
- nginx 反向代理后端并缓存数据的方法
- nginx "ssl_stapling" ignored, issuer certificate not found for certificate解决方法
- 不知道是不是错觉,感觉caddy 比nginx快
- nginx: [warn] "ssl_stapling" ignored, issuer certificate not found for certificate的错误解决方法
- 免费的Nginx 代理,管理器面板
- Nginx使用Memcached缓存加速wordpress,秒开网站
- default.rsyncssh must have maxProcesses set to 1.的解决方法
- 重新编译nginx,以便支持最新的quic(http3)以及 brotli 压缩