4👍
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.)
1👍
runserver
is for debugging, in production we use gunicorn/uwsgi to boot the django app, so the question can be Do we need Nginx if we have configured gunicorn/uwsgi for Django
, the answer is YES
, becuase compared with gunicorn/uwsgi, Nginx has following advantages
:
- security, it can be configured to deny or allow certain ip addresses
- load balancing
- handle static files
- cache
- …
refer to more features: https://en.wikipedia.org/wiki/Nginx#HTTP_proxy_and_Web_server_features
- [Django]-How to import django models in scrapy pipelines.py file
- [Django]-Truncate the length of model serializer with many=True in Django
- [Django]-Django admin login returns Forbidden 403 CSRF verification failed. Request aborted
- [Django]-"Error while running '$ python manage.py collectstatic –noinput'" after changing database on django
- [Django]-Get the first element in the for loops in the Django template
Source:stackexchange.com