1👍
✅
Okay, got it.
In nginx proxy_pass
you have to pass the ipv6 and in gunicorn you have to double bind https://djangodeployment.readthedocs.io/en/latest/06-gunicorn.html
in nginx,
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_set_header X-NginX-Proxy false;
real_ip_header X-Real-IP;
proxy_pass http://[::1]:8000;
proxy_redirect off;
}
and in gunicorn
command = /home/www/miip/venv/bin/gunicorn --workers 3 --bind unix:/home/www/miip/app.sock --bind [::1]:8000 app.wsgi:application
Source:stackexchange.com