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"
- default.rsyncssh must have maxProcesses set to 1.的解决方法
- openLitespeed的教程
- nginx反向代理配置演示,包括静态资源处理,百分百成功
- openwrt使用Nginx 替代uhttpd
- nginx配置时HTTPS出现"nginx: [warn] "ssl_stapling" ignored"的解决方法
- nginx 使用gzip和Brotli压缩对比测试
- 免费的Nginx 代理,管理器面板
- nginx "ssl_stapling" ignored, issuer certificate not found for certificate解决方法
- 比较简单实用高效的网站防止灌水和反爬虫方案