I'm working on Magento Cloud version, but I'm having an error with 502 Bad Gateway on nginx.

502 Bad Gateway

My question is that how to check the nginx log on Docker local environment?

1 Answer 1


502 error

nginx upstream not available. you need to check nginx proxy / php block in configuration.

nginx php upstream wrong port defined, socket permissions, upstream not running, firewall blocking,

error log you can see in nginx config:

https://docs.nginx.com/nginx/admin-guide/monitoring/logging/#error_log https://nginx.org/en/docs/ngx_core_module.html?#error_log

error_log /path/to/folder/with/error.log;
  • Did you work on Cloud version with Docker on local? Dec 13, 2019 at 3:16
  • how does that help you ??
    – MagenX
    Dec 13, 2019 at 9:58
  • 1
    just go to container and check log, but the problem in upstream misconfiguration.
    – MagenX
    Dec 13, 2019 at 9:59
  • Oh, how to check it in the container? Dec 13, 2019 at 10:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.