
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"的解决方法
- how to do config nginx allow's cloudflare ip's
- Configure nginx to only allow cloudflare's IP to connect to the server shell script
- nginx安全设置之-限制IP来源只能为cloudflare
- nginx配置时HTTPS出现"nginx: [warn] "ssl_stapling" ignored"的解决方法
- MySQL8 method to restrict the connection of the intranet IP segment
- nginx打上QUIC补丁,抢先体验http3
- 一款可视化适合小白的cdn构建系统
- 快速构建高可用的IP,科学上网方法
- ERROR 1054 (42S22): Unknown column 'id' in 'field list'的解決方法