https://stackoverflow.com/questions/43349031/deploying-django-application-in-aws-raise-disallowed-host-exception

You are privileged to get such a verbose error..

Exception Type: DisallowedHost at / Exception Value: Invalid HTTP_HOST header: 'django-env.vsvztq2hxp.us-west-1.elasticbeanstalk.com'. You may need to add 'django-env.vsvztq2hxp.us-west-1.elasticbeanstalk.com' to ALLOWED_HOSTS.

Just add django-env.vsvztq2hxp.us-west-1.elasticbeanstalk.com to your ALLOWED_HOSTS in settings.py

Do something like this

#in settings.py

ALLOWED_HOSTS = [ 'django-env.vsvztq2hxp.us-west-1.elasticbeanstalk.com', ...]


+ Recent posts