502 Bad Gateway nginx error

I am getting 502 Bad Gateway nginx error …my main website is in _bnew/quizzes/public/…this is the architecture.
Its urgent.
Please help me if anybody can i help me out.

Have you checked that PHP-FPM is running properly etc? 502 Gateway issue can sometimes be related to FPM before it’s a script issue. If FPM etc is all working (you can test this by putting a blank index.php in your _bnew/quizzes/public/ folder with something like <?php echo 'testing'; ?> in it. If that file runs fine, then you’ll need to have a look at your PHP error logs for the issue with running Slim - it should indicate in there if something has gone wrong when instantiating the app

Thanks for your effort.If you can please tell me how to check the PHP-FPM is running or not.

$app = new \Slim\Slim(array(
‘debug’ => true,
‘log.enabled’ => true,
‘templates.path’ => ‘…/templates’
));

as soon as i call the slim framework the 502 Bad Gateway error appears.

I am not able to find out the error.

I got how to check PHP FPM

Okay, so FPM is running by the sounds of things, so did you try what I suggested above and created an index.php file with a simple echo statement in it? If you do this and it works, then it means your server set up is running but if not, then it will probably be a config issue with NGINX.

If the simple index file works, then I would start with one of the Slim Skeleton apps, and you should be able to simply install via composer (or do offline and upload depending on your set up) and if that fails, you’ll need to check your server logs. If you look in the folder where your logs are located on the server (for *nix this will be something like /var/log/<nginx or php-fpm or yourSite etc>.log you should see something indicating where to look for the issue if no error output is rendered to the screen

thank you brother checking the log