Nginx Bad Gate-Away Error
When you work with Nginx Server as a Web Server or a Reverse Proxy Server, sometimes you might experience a "Bad Gateway" Error where Ingenx fails to load the Application. The solution to solving this problem in Ubuntu is by going to var/logs/nginx folder and then get the error.log file, bring it to the local machine to examine it. Most of the time the error looks like this:
2019/02/26 16:16:45 [error] 12544#12544: *5608 upstream sent too big header while reading response header from
Specifically working with Drupal 8, Nginx and PHP7.2-fpm, it is advisable to check the error logs in the var/logs folder if you are working with Ubuntu Linux (18.0.4). When you check the logs, you will find the Nginx logs folder and find a current log, copy the error into Google Search and find how other developers resolved the issue.
In my case the error was:
2019/01/03 15:56:15 [error] 3694#3694: *36 upstream sent too big header while reading
response header from upstream, client: 98.987.8776, server: ,
request: "GET /dormainName HTTP/1.1",