---
title: "Discussion on \"Configuring NGINX as a Reverse Proxy for Django and React\" | Hashnode"
description: "Discussion on \"Configuring NGINX as a Reverse Proxy for Django and React\". Configure NGINX with Docker as a reverse proxy for Django & React. Handles API routing, static files, SSL, and proxy headers."
url: "https://hashnode.com/posts/configuring-nginx-as-a-reverse-proxy-for-django-and-react/6a6a807a5e5c54c43a656267"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Configuring NGINX as a Reverse Proxy for Django and React](https://sumyelwa.hashnode.dev/configuring-nginx-as-a-reverse-proxy-for-django-and-react?utm_source=hashnode&utm_medium=feed)

Configure NGINX with Docker as a reverse proxy for Django & React. Handles API routing, static files, SSL, and proxy headers.

Jun 15 · 6 min read · sumyelwa.hashnode.dev  
Read the article

-   [#nginx](https://hashnode.com/tag/nginx)
-   [#docker](https://hashnode.com/tag/docker)
-   [#django](https://hashnode.com/tag/django)
-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#reverse-proxy](https://hashnode.com/tag/reverse-proxy)
-   [#ssl](https://hashnode.com/tag/ssl)
-   [#letsencrypt](https://hashnode.com/tag/letsencrypt)
-   [#devops](https://hashnode.com/tag/devops)
-   [#linux](https://hashnode.com/tag/linux)
-   [#cloud-engineering](https://hashnode.com/tag/cloud-engineering)
-   [#production](https://hashnode.com/tag/production)
-   [#web-server](https://hashnode.com/tag/web-server)

## Written by

[shafiu usman](https://hashnode.com/@SumCloud)

@SumCloud

  
[View profile](https://hashnode.com/@SumCloud)

SumCloud

## Responses 2

Markdown supported · ⌘↵ to post

[Edge Ops](https://hashnode.com/@edgecacheops)

[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.

[Node Edge Ops](https://hashnode.com/@nodeedgeops)

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

Reverse proxy tip: preserve Host and X-Forwarded-Proto, set a sane proxy\_read\_timeout, and put buffering off only when you need streaming. TLS stays at the edge on a single VPS.
