how to dynamically configure haproxy's front end and backend?

左心房为你撑大大i 提交于 2019-12-11 15:26:08

问题


I am totally lost on this one.How can haproxy's lu script be used to dynamically change values in the frontend and backend sections of haproxy.cfg.

haproxy.cfg

frontend http-in
    mode    http

    bind 206.189.22.155:80

    acl path-page-designer              path_beg -i $PATH
    use_backend page-designer-backend   if path-page-designer

backend page-designer-backend
    mode    http

    option  httplog
    option  forwardfor

    server  appserver1 206.189.22.155:$PORT

How can i change the value of $PATH and $PORT in the acl and backend respectively?If lua script cant do this,is there any other script which will let me dynamically change these values.My goal is to basically map applications running on various ports to a specific url. Example: If an app runs on the url IP:PORT/SERVICENAME, then it should be mapped to the url IP/SERVICENAME.plz help

来源:https://stackoverflow.com/questions/57900345/how-to-dynamically-configure-haproxys-front-end-and-backend

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!