After I deployed my Django App last night I got tons of strange Emails saying:
ERROR: Invalid HTTP_HOST header: \'/webapps/example_com/run/gunicorn.sock
I found the answer to my my question in a django bug report.
proxy_set_header Host $http_host;
has to be replaced with:
proxy_set_header Host $host;
to make nginx pass the correct headers from that on instead of the gunicorn socket the requested page was in the django alerts.