
nginx: [emerg] Solution to unknown directive "set_real_ip_from"
Nginx: [emerg] unknown directive" set_real_ip_from "
appears because nginx is missing the realip module
Add the realip module to compile again. . .
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
Remember to add the --with-http_realip_module
module
If nginx is already online, just execute make
, and then back up the old nginx process files,
Copy the compiled new nginx binary file to the nginx installation sbin directory
💘 相关文章
- nginx: [emerg] unknown directive "set_real_ip_from"的解决方法
- Configure nginx to only allow cloudflare's IP to connect to the server shell script
- how to do config nginx allow's cloudflare ip's
- nginx安全设置之-限制IP来源只能为cloudflare
- 快速构建高可用的IP,科学上网方法
- 亲测可用debian 9添加多ip实例的方法
- 不知道是不是错觉,感觉caddy 比nginx快
- 解决nginx反向代理验证码不显示的方法
- register nginx systemctl service
- nginx打上QUIC补丁,抢先体验http3