OK, through much trial and error, this is what I found. References at the end of articles and posts that helped me. This is for GoDaddy, but I suppose something similar would work for other providers.
GoDaddy gave me the following files:
-rw-rw-r--. 1 wmsodbc wmsV9 1728 Jul 14 09:20 gdig2.crt.pem
-rw-rw-r--. 1 wmsodbc wmsV9 4795 Jul 14 09:20 gd_bundle-g2-...
Well you can try to create a proxy per backup server and use the track feature.
But as Gerard written it would be better to have on every server the same host name. For tomcat is this Host Name Aliases
HAProxy track suggestion (untested)
option httpchk GET /resource/healthcheck HTTP/1.1\r\nHost:\ server2.example.com
If the query parameter refers to a container that you can address directly, you can just pass that to proxy_pass directly, e.g.:
But that's using untrusted input and is also a massive security hole. Consider ?appType=www.google.com. I show this as an example of what not to do.
Instead, use a map to map query ...