访客

开启frpc内网穿透后nginx网站获取访问ip全是127.0.0.1本地ip的解决办法

5037 大谋儿 知识探索

首选修改frpc.ini配置

添加一行

proxy_protocol_version = v2

每个需要的隧道都要添加

[xxxxxxxxxxxxx]
# 备注:-xxxxxxx
privilege_mode = true
type = http
local_ip = 127.0.0.1
local_port = 80
custom_domains = bangshun.com
use_encryption = true
use_compression = true
proxy_protocol_version = v2

修改网站的配置文件,替换或者添加如下内容

server{
listen 80 proxy_protocol;
listen 443 ssl proxy_protocol;
set_real_ip_from 111.111.111.111;#frp服务端ip
set_real_ip_from 127.0.0.1;
real_ip_header proxy_protocol;
real_ip_recursive on;
省
略
后
面
一
大
堆
}

重启一下frpc和nginx试试吧

frpc真实ip.jpg 开启frpc内网穿透后nginx网站获取访问ip全是127.0.0.1本地ip的解决办法 知识探索

THE END
相关文章

下面的例子是导出网站用户1的所有文章名,每次取出100个文章set_time_limit(0); //封装好的函数 function GetAllData($method, $w, 

zblog调取大量数据内存不溢出的方法

//首页过滤指定分类文章并重建分页;//挂接口:Add_Filter_Plugin('Filter_Plugin_ViewList_Core', 'zbpPlus_Exclude_Category

zblogPHP 首页过滤指定分类文章并重建分页

function readers(){     global $zbp;     $limit =&nbs

zblog读者墙数据调用php代码

评论列表
  • 暂时还没有人评论哦,来占个沙发吧?
发布评论
验证码