In Haproxy 1.8.8, I am trying to log the final URI (not the incoming URI that was received in the frontend), In the backend section, i have proxy rewrite rule to change the path. I want that new path to be in the haproxy log. Here is the sample haproxy config file, i want to log /defgh/v1/newpath
somewhere in the log. By default, http log-format captures only the request URI which in this below sample it wille /abc/oldpath
. Can anyone please suggest how to capture the final path after rewrite rule is processed
sample haproxy config
frontend http-in
option httplog
bind *:80
acl url_oldpath path_beg /abc/oldpath
use_backend servers if url_oldpath
backend servers
reqirep ^([^\ ]*)\ /abc/oldpath(.*) \1\ /defgh/v1/newpath\2
server server1 myServerIP:80