How to configure nginx and uWSGI to serve Django projects
blog.eyallupu.com
blog.eyallupu.com
location / {
uwsgi_pass <xxx>;
include uwsgi_params;
uwsgi_param UWSGI_SCHEME $scheme;
}
Without the UWSGI_SCHEME part, Django's Request.get_absolute_uri will return URIs starting with 'http' even if your site is served over HTTPS.What about setting up logging, email, exception emails, time zone, https - things that are actually important for those that haven't done installations much.
For a good comparison on different WSGI servers (aka uwsgi vs gunicorn, etc):
Regarding the benchmark, it is a bit outdated and the apache+mod_wsgi analysys/configuration is totally wrong (i am one of the uWSGI authors, but mod_wsgi is great, and seeing it blasted wrongly in that url is a bit disappointing)
By the way, do not choose your application server looking only at performance.really.
Depending on how you choose to implement it, this may also result in cleaner architecture if you have Varnish as a simple HTTP brick with little knowledge of the backend implementation, leaving all of the gory details to nginx.
Wasnt the point of a web application framework that you could put it anywhere and type run and have it done, instead of having to think of process- or event- or thread- based serving and static files? Thats not python. Even php is simpler/better in this regard.
Its not so difficult to run an instance of a threaded/process/eventlet server and let your app do the work.