I am using Django to develop a web application on the linux server.
When it comes to deployment, a proposed way is to use Nginx to communicate with the client and Django only need to communicate with Nginx with uwsgi protocol.
The relationship is client<-Http->Nginx<-uwsgi->Django server
Latter I found that I can also push the server on public network with
python manage.py runserver 0:0:0:0
It seems that the Nginx can help serve the static file and media.
My question is, what is exactly the benefit of using Nginx as the middleman?
From the docs on runserver:
DO NOT USE THIS SERVER IN A PRODUCTION SETTING. It has not gone through security audits or performance tests. (And that’s how it’s gonna stay. We’re in the business of making Web frameworks, not Web servers, so improving this server to be able to handle a production environment is outside the scope of Django.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With