On both master and backup you'll want to go to Web Server settings and turn off "Autodetect HTTP Address" and then specify the actual IP/hostname in "Public Address".
and you do have to make sure that the IP or hostname you're accessing these gateways at is actually in each of the corresponding certificates.