Http-request redirect

Hi all,

Apologies if this is a stupid request but I’m quite new to HAProxy…
I have TMK a simple use-case:
I want to redirect requests made into my KVM host, to the URl of one of the guest VMs, in this case a gitea box.
So…
HAProxy is running on the KVM host (10.10.10.5 - gitout.mine.local:3000)
Gitea guest VM running on KVM (172.10.10.5 - gitea.lab.local:3000)

How can I make a request to ‘gitout.mine.local:3000’ and redirect it into, gitea.lab.local:3000

It would seem I need to use the ‘http-request redirect’ function in HAProxy but I still can’t wrap my head around it.
Could anyone one kindly provide some pointers on how to achieve the example above?
Many thanks in advance.

Cheers,

So…
I’m able to get a single http redirect running with:
#-------------------
#My Frontends
#--------------------
frontend gitea
bind *:3000
http-request set-header X-Forwarded-Proto http
default_backend gitea

#--------------------
#My Backends
#--------------------
backend gitea
option httpchk
option forwardfor
server gitout.mine.local:3000 git.mine.local:3000

The issue arises when I try to add another redirect, this time for a KVM guest that serves https:

#-------------------
frontend ansible
bind *:80
http-request set-header X-Forwarded-Proto http
default_backend ansible

#-------------------
backend ansible
option httpchk
option forwardfor
server ansout.mine.local ans.mine.local:443

In this instance it doesn’t redirect from port 80 to ans.mine.local:443.
Any pointers?
TIA.