问题
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