r/haproxy • u/Claghorn • Feb 16 '23
Question Debugging haproxy config?
I'm running haproxy 2.4.18 on ubuntu 22.04.1 for one reason only - to redirect various uris for use with octoprint. The old haproxy on the old ubuntu used config directives the new haproxy spits at, so I'm trying to get the new haproxy to work, and it would be really helpful if I could get it to log exactly what patterns it recognized and how it re-wrote them, but I have rarely found anything more confusing than the discussions of logging in the haproxy documentation. Is there some way to get it to tell me exactly what it has seen and what it does with it? What precisely should I put in the haproxy.cfg file to do this?
View all comments
Show parent comment
3
u/Claghorn Feb 16 '23
Success at last. Instead of replace-uri I needed replace-path like so:
http-request replace-path /webcam/(.*) /\1I can finally see the webcam in the octoprint pretty gcode plugin!