Suddenly getting a 502 Bad Gateway error
A 502 Bad Gateway
error is not caused by static HTML like you just displayed.
The server was probably having an internal error or an error communicating with other servers - maybe there was a (temporary) overload, or another server/service was not reachable. Does it still happen when you clear your cache or use another browser/computer?
Can you tell us more about your webserver, and its links to other servers/services?
The cause for the 502
is not on the page. Looks more like a configuration issue, either on the server or on a network component (router).