0

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 dynamically change the values of $PATH and $PORT using lu script?Can someone show me an example of an lu script for this haproxy.cfg?I will me invoking this script using a command line script with all the application specific values as parameter from my azure pipeline configuration.But for this i need to know how a sample script for this will look like.I mean need a basic idea to get me started.Plz help

  • you can start to use confd – c4f4t0r Sep 11 at 17:44
  • hi is this a tool that has to be used along with haproxy ? – Vignesh Swaminathan Sep 12 at 3:38
  • iam just looking for a way to dynamically change the values of $PATH and $PORT using lu script in haproxy!! – Vignesh Swaminathan Sep 12 at 3:38
  • use lua-load /path/to/hello.lua in the global section to load your script – c4f4t0r Sep 12 at 7:24
  • can you show me an example of a lua script for changing the $PATH and $PORT dynamically? – Vignesh Swaminathan Sep 12 at 9:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.