Proxy servers function by sharing information with each other. For
example, in our WordPress hosting plans, we use Apache to generate
the website. However, Nginx offers other tantalizing benefits for
your speeding up your site with caching. So we use Nginx as a
reverse proxy for Apache.
This means, in effect, that the single server is using two different
web server programs. Sometimes, information being processed and
sent back and forth might get garbled or glitch out. In this case,
Apache or Nginx might cause the 502 error.