I have enabled the setting:
USE_X_FORWARDED_HOST = True
in my settings.py. I am currently deploying the server, but when I try to render my index page it gives me a 404. The email says that it is a:
Invalid HTTP_HOST header: u'127.0.0.1:9001
And BEFORE ANYONE SAYS THAT I NEED TO ADD IT TO MY ALLOWED_HOSTS, I already have, so please spare me with from that advice. I also received an email with the debug error. When I looked through the debug info, it had a list of my settings and it stated that:
USE_X_FORWARDED_HOST = False
Another field that is not being updated is my ALLOWED_HOSTS. I tried restarting apache2, touching wsgi.py, and deleting *.pyc in the main app directory that contains settings.pyc. However, none of this has worked.
Some background on my deployment. I have my django behind a proxy because I am using django channels with an apache2 webserver serving as the proxy. I also have daphne running behind it which receives the requests and services them.