Shpend Palushi
Shpend Palushi

Reputation: 617

Deploying Django application To AWS ElasticBeanstalk

I am trying to deploy a django application to AWS ElasticBeanstalk. I am working on a Linux machine. It all goes well but when deployment is done I get "502 Gateway Error". From a deep search I found that people with the similar problem created Procfile to the root directory of the project and added the following to that: "web: gunicorn--bind :8000 --workers 3 --threads 2 applicationName.wsgi:application". I tried that but then I get "ServiceError - Failed to deploy application." Any clues on that?

Upvotes: 2

Views: 167

Answers (1)

Shpend Palushi
Shpend Palushi

Reputation: 617

Pretty weird but it was showing that Gateway Error only because I had left

ALLOWED_HOSTS=['*']

After changing that to

ALLOWED_HOSTS=['app_url'] 
# where app_url is the url provided by eb when it is deployed firstly  

Upvotes: 1

Related Questions