Nginx as a Reverse Proxy
Front Gunicorn and serve static files.
Why Add Nginx
Gunicorn runs your code, but it should not face the raw internet alone. A reverse proxy sits in front and shields it. 🛡️
What a Reverse Proxy Does
A reverse proxy receives every browser request, then forwards it to Gunicorn and relays the answer back. The client never talks to Gunicorn directly.
All lessons in this course
- Gunicorn as the WSGI Server
- Nginx as a Reverse Proxy
- WhiteNoise for Static Files
- Environment Variables and Settings Split