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

  • 相关阅读:
    数据库设计Step by Step篇目整理及下载地址
    SQL puzzles and answers读书笔记——预算执行问题
    MongoDB快速入门——SQL与MongoDB的对照
    C语言中的atan和atan2
    FTP命令
    vueelementadmin前端跨域问题解决
    回归
    学习kvm(一)
    利用spicevdagent实现文本拷贝、鼠标非陷入
    政策转向确立,降准只是开始
  • 原文地址:https://www.cnblogs.com/hixiaowei/p/9934162.html
Copyright © 2011-2022 走看看