I have OpenSSL/1.0.2k and got a similar message (Could not resolve host: cdn.richeyweb.com or Error 504 - Gateway Timeout
The gateway did not receive a timely response from the upstream server or application.) on 3 different Joomla sites. Disabling both geoip plugins in phpmyadmin temporary fixed mentioned issue.
Enabling it again, an issue remains.
Strange for me is a fact, that I have about 10 Joomla sites hosted on same server (everything updated), but I got error on only 3 sites.
Any ideas what can cause this issue?
Kind regards!