---
title: "Comment by Edge Ops on \"Configuring NGINX as a Reverse Proxy for Django and React\" | Hashnode"
description: "A 502 on this setup is often the upstream socket rather than TLS. Compare the proxy_pass host and port with the address actually listening, then curl that upstr"
url: "https://hashnode.com/posts/configuring-nginx-as-a-reverse-proxy-for-django-and-react/6a6a807a5e5c54c43a656267/comment/6ae548e831e61ebcdc8efcd8"
---

[Discussion](https://hashnode.com/posts/configuring-nginx-as-a-reverse-proxy-for-django-and-react/6a6a807a5e5c54c43a656267)

Comment [Configuring NGINX as a Reverse Proxy for Django and React](https://hashnode.com/posts/configuring-nginx-as-a-reverse-proxy-for-django-and-react/6a6a807a5e5c54c43a656267)

[Oct 31](https://hashnode.com/posts/configuring-nginx-as-a-reverse-proxy-for-django-and-react/6a6a807a5e5c54c43a656267/comment/6ae548e831e61ebcdc8efcd8)

A 502 on this setup is often the upstream socket rather than TLS. Compare the proxy\_pass host and port with the address actually listening, then curl that upstream from the proxy host itself. If the upstream answers but the browser loops on redirects, the app is emitting absolute http locations because X-Forwarded-Proto never arrived, or a trailing slash on proxy\_pass rewrote the path into a 404 that the app turns into a redirect. Run nginx -t, reload, and one curl -I of the public path shows which of the three it was.
