zoukankan      html  css  js  c++  java
  • haproxy [WARNING] 312/111530 (17395) : config : 'option forwardfor' ignored for frontend 'harbor_login' as it requires HTTP mode.

    1.经过调查,

    2down voteaccepted

    x-forwarded-for is an HTTP header field, so has nothing to do with the transport layer (TCP). Usually web proxies insert the x-forwarded-for data.

    直接把#   option forwardfor       except 127.0.0.0/8  
    注释掉重启就行。
    2.front和backend

    #---------------------------------------------------------------------
    frontend main *:5000
    mode tcp
    acl url_static path_beg -i /static /images /javascript /stylesheets
    acl url_static path_end -i .jpg .gif .png .css .js

    use_backend app if url_static
    default_backend app

    #---------------------------------------------------------------------
    # login frontend which proxys to the backends harbor login
    #---------------------------------------------------------------------
    frontend harbor_login
    bind *:4430
    mode tcp
    option tcplog
    default_backend harbor_login


    #---------------------------------------------------------------------
    # round robin balancing between the various backends
    #---------------------------------------------------------------------
    backend app
    mode tcp
    balance roundrobin
    server app1 172.16.6.50:5000 check

    #---------------------------------------------------------------------
    # round robin balancing between the various backends
    #---------------------------------------------------------------------
    backend harbor_login
    balance roundrobin
    mode tcp
    server harbor_login 172.16.6.50:443 check

  • 相关阅读:
    securecrt 中文乱码解决方案
    linux文件压缩、下载命令
    weinre调试
    linux查看当前目录命令
    linux下清除缓存文件并重启tomcat
    undefined加引号和不加引号的区别
    web/wap微博分享链接
    linux查找文件内容
    MySQL 5.1 安装过程中报apply security setting错误的解决办法 收藏
    Sleep Mode For WSN of Jennic
  • 原文地址:https://www.cnblogs.com/hixiaowei/p/9934162.html
Copyright © 2011-2022 走看看