I have a very basic setup and am trying to use haproxy as reverse proxy to route requests to different servers based on my urls.
log 127.0.0.1 local2 info
Default SSL material locations
timeout connect 5000
timeout client 50000
timeout server 50000
stats uri /
stats auth admin:admin
acl workspace path_end -i /cb
use_backend srvc_workspace if workspace
#http-request set-path / if workspace
server server1 myapp
cookie QPP prefix
#server qppworkspace qppworkspace:3000
server qppworkspac google.com
My sample configuration is shown above.
If I hit the url server/cb, it takes me to the desired server but appends /cb to that url, so essentially I get an error 404 as myserver/cb does not exist.
I just want to route the request if my path contains /cb but /cb should not be part of the final url that reaches my back end.
Thanks again for helping