I just spent some time trying to figure out how to set our Django application.
Our setup is:
Apache (handles HTTPS and client certificates) is front-end proxy to uwsgi
uwsgi is used to run Django application in the backend.
The problem we faced is that our redirects were broken as links build by django used 'localhost' instead of name of the virtual host. After looking through solutions, and finding some of the issues like:
- Redirect is broken when HTTP_X_FORWARDED_HOST contains multiple hosts
- django.http.get_host() breaks reverse proxying on apache