I'm not sure if I'm doing something wrong, as I'm fairly new to Fuel. I've downloaded 0.9.3, played around with the view files, blocks, layout etc and got a couple of pages working fine. I then switched to the CMS, but when uploading blocks I started getting some 502 Bad Gateway errors, "The server returned an invalid or incomplete response." The site itself displayed fine, but eventually I couldn't even get the dashboard to display.
I assumed an error on my part, backed everything up and started afresh, new download, clean db install. I've just gone into the CMS, uploaded the first block, but when I tried a second it resumed the 502 Bad Gateway response. All I had done was modified the files needed to install Fuel. It's on a hosted server too, not my localhost server. Now if I try to save as block I get a 502 error on the url fuel/blocks/edit/2. Going back to the Control Panel works, and it appears that the block was saved too.
Bad gateway refers to http error 502 which is mean that a server which is try to fulfill the client request received an invalid response from upstream server. It is often a network error between servers on the internet, meaning the problem wouldn't be with your computer or internet connection. Empty or incomplete headers or response body typically caused by broken connections or server side crash can cause 502 errors if accessed via a gateway or proxy. Since it's just a generic error, it doesn't actually tell you the website's exact issue.
How to Solve 502 Errors
Perform a hard-refresh in your browser. On Macs, this is done by pressing Cmd + Shift + R.
Clear your browser cache and delete cookies. Your browser may be holding on to certain files that were saved once you visited the website with a 502 error.
Change your DNS servers. If you’ve never changed them in the past you likely still have the default servers assigned to you by your ISP, try using open DNS servers such as Google's Public DNS.
Finally, restart your computer/networking equipment. Some temporary issues with your computer and how it's connecting to your network could be causing 502 errors, especially if you're seeing the error on more than one website. In these cases, a restart would help.