Hi
I am new to haproxy and facing difficulty with backend with full url
I have the following setup:
HAProxy version 2.4.22-f8e3218
OS = Rhel9
My situation
User do the following
1.) Open browser and hit → https://erp.domain.com.sa
2.) Redirect this https://erp.domain.com.sa → https://newurl.domain.com (without .sa). We need to hit URL, since it will pass some parameter into #3.
3.) From #2 https://newurl.domain.com(withou .sa) , it returns https://mynewurl.domain.com(without .sa) , the url comes with some parameters
4) The backend server is a MS dynamics 365.
Or even without ssl is also an option.
=== haproxy config file ======
frontend ax365
bind *:80
bind *:443 ssl crt /etc/haproxy/ssl force-tlsv12
mode http
http-request redirect scheme https unless { ssl_fc }
log 127.0.0.1:514 local0
use_backend backend_ax365
backend backend_ax365
mode http
log 127.0.0.1:514 local1
http-request set-uri https://ax.d365.onprem.domain.com/namespaces/AXSF/
server ax1 172.19.xx.xx:443
server ax2 172.19.xx.xx:443
server ax3 172.19.xx.xx:443
I am getting 502 Bad Gateway error. When I curl -kL https://newurl.domain.com, I can reach backend server and see the html scripts
Can you please help .