testVmap's recent timeline updates
testVmap

testVmap

V2EX member #211768, joined on 2017-01-22 10:18:18 +08:00
启动 zabbix 服务卡顿
问与答  •  testVmap  •  Nov 16, 2018
keepalived VIP 漂移问题
问与答  •  testVmap  •  Nov 8, 2018
nginx 反向代理微信服务器问题
问与答  •  testVmap  •  Oct 22, 2018  •  Lastly replied by testVmap
5
nginx 如何获取真实的 IP
问与答  •  testVmap  •  Sep 18, 2018  •  Lastly replied by testVmap
10
红帽知识库为什么显示不完整
Linux  •  testVmap  •  Sep 9, 2018  •  Lastly replied by testVmap
4
PHP 安全漏洞该如何打补丁
问与答  •  testVmap  •  Sep 8, 2018  •  Lastly replied by testVmap
5
Python 图像识别 如何找出图像的中心点
Python  •  testVmap  •  Jul 9, 2018  •  Lastly replied by testVmap
19
Python 如何在循环内调用随机函数使结果随机
  •  1   
    Python  •  testVmap  •  Nov 3, 2017  •  Lastly replied by hcnhcn012
    6
    testVmap's recent replies
    Oct 22, 2018
    Replied to a topic by testVmap 问与答 nginx 反向代理微信服务器问题
    location ^~ /mp/
    {
    #proxy_cache api_cache;
    proxy_set_header Host mp.weixin.qq.com;
    rewrite /mp/(.+)$ /$1 break;
    proxy_pass https://mp.weixin.qq.com;
    }

    最后改成了根据请求路径转发
    Sep 18, 2018
    Replied to a topic by testVmap 问与答 nginx 如何获取真实的 IP
    感谢大家,最后配置如下
    服务器 A 的转发配置
    location ^~ /namesg/ {
    proxy_pass http://172.16.16.11;
    proxy_set_header Host $http_host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Real-IP $remote_addr;
    }

    服务器 B 的 nginx.conf log 配置

    log_format my_format '$http_x_real_ip -'
    '$remote_addr- [$time_local] "$request" '
    '$status $body_bytes_sent "$http_referer" '
    '"$http_user_agent" "$http_x_forwarded_for"';
    access_log logs/access.log my_format;


    主要是 nginx 日志取消注释后还不能生效,需要改下日志名字
    Sep 18, 2018
    Replied to a topic by testVmap 问与答 nginx 如何获取真实的 IP
    A 服务器的日志能正常获取到真实 IP
    Sep 18, 2018
    Replied to a topic by testVmap 问与答 nginx 如何获取真实的 IP
    @lshero 是要怎么配置,要修改 log_format 吗
    Sep 18, 2018
    Replied to a topic by testVmap 问与答 nginx 如何获取真实的 IP
    A 服务器转发配置
    location ^~ /sogood {
    proxy_pass http://172.16.0.7:81;
    proxy_pass_header Server;
    proxy_set_header Host $http_host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Scheme $scheme;
    proxy_set_header Cookie $http_cookie;
    proxy_set_header Referer $http_refere;
    proxy_set_header X-Forwarded-For
    $proxy_add_x_forwarded_for;
    #proxy_set_header X-Forwarded-For $remote_addr;
    #proxy_set_header REMOTE-HOST $remote_addr;

    }


    B 服务器转发配置
    location ~ \.php$ {
    proxy_pass http://127.0.0.1;
    proxy_pass_header Server;
    proxy_set_header Host $http_host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Scheme $scheme;
    proxy_set_header Cookie $http_cookie;
    proxy_set_header Referer $http_refere;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }



    加了感觉还是没用
    Sep 9, 2018
    Replied to a topic by testVmap Linux 红帽知识库为什么显示不完整
    @xcai 谢谢了
    Sep 8, 2018
    Replied to a topic by testVmap 问与答 PHP 安全漏洞该如何打补丁
    感谢大家了,升级到最新 5.6.37 搞定了
    Sep 8, 2018
    Replied to a topic by testVmap Linux 红帽知识库为什么显示不完整
    @adadada 好的,谢谢了
    Jul 9, 2018
    Replied to a topic by testVmap Python Python 图像识别 如何找出图像的中心点
    Jun 28, 2018
    Replied to a topic by testVmap Python Python 图像识别 如何找出图像的中心点
    已经实现,用的 opencv 先灰度模糊,再二值化,找到图形轮廓最后确定中心点
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2432 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 07:50 · PVG 15:50 · LAX 00:50 · JFK 03:50
    ♥ Do have faith in what you're doing.