Hello,
did you followed the atlassian-guide?
> https://confluence.atlassian.com/jirakb/integrating-jira-with-nginx-426115340.html
> https://confluence.atlassian.com/confkb/how-to-use-nginx-to-proxy-requests-for-confluence-313459790.html
usually when nginxy says "502" you should trust this.
for debuggging, try
curl -v http://JIRA_IP:JIRA_PORT/ from the server nginx runs on., to see, if you have
access to the ressource you configured in proxy_pass
cheers,
mex