In this exemple of configuration, if the first server fail (proxy_connect_timeout) one time (max_fails), the second server will be used for 60s (fail_timeout).
The SSL certificate need to be configure on the ReverseProxy server AND the proxyied servers. You can use the same certificate and configurations on all servers.
To test the configuration you can change your host file to simulate the correct domain name.
Use the following tool to configure SSL with optimal configuration.