[SOLVED] Bad gateway after fresh installation

Might be SELinux or a firewall.
This post might help you: