我后端获取的ip都是cf的ip。
热议
2楼 tkzc 11小时前
请求头里有真实IP
丢在伪静态里
4楼 shwish 10小时前
cf-connecting-ip就是真实ip
https://developers.cloudflare.com/fundamentals/get-started/reference/http-request-headers/
5楼 lonefly 10小时前
https://www.yunloc.com/647.html
6楼 mianfeizhujiwu2 9小时前
涨姿势,来学习下~
7楼 斌斌 1小时前
https://www.yunloc.com/647.html
方法2,我把代码添加到我/etc/nginx/nginx.conf 的http里面,重启出错,不能添加这个代码呢。
8楼 lonefly 1小时前
方法2,我把代码添加到我/etc/nginx/nginx.conf 的http里面,重启出错,不能添加这个代码呢。 ...
站点日志后面加上access
access_log /www/wwwlogs/yunloc.com.log access;
9楼 斌斌 半小时前
站点日志后面加上access
access_log /www/wwwlogs/yunloc.com.log access;
不是这个问题呢。是加了方法二的东西,重启nginx直接出错。
Job for nginx.service failed because the control process exited with error code.
See "systemctl status nginx.service" and "journalctl -xe" for details.
root@HZ1 ~ # systemctl status nginx.service
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2023-01-05 10:32:36 CST; 6s ago
Docs: man:nginx(8)
Process: 166235 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited,> CPU: 5ms
Jan 05 10:32:36 HZ1 systemd[1]: Starting A high performance web server and a reverse proxy server...
Jan 05 10:32:36 HZ1 nginx[166235]: nginx: [emerg] pcre_compile() failed: unrecognized character after>Jan 05 10:32:36 HZ1 nginx[166235]: nginx: configuration file /etc/nginx/nginx.conf test failed
Jan 05 10:32:36 HZ1 systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
Jan 05 10:32:36 HZ1 systemd[1]: nginx.service: Failed with result 'exit-code'.
Jan 05 10:32:36 HZ1 systemd[1]: Failed to start A high performance web server and a reverse proxy ser>
申明:本文内容由网友收集分享,仅供学习参考使用。如文中内容侵犯到您的利益,请在文章下方留言,本站会第一时间进行处理。
评论前必须登录!
立即登录 注册