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?
-
1Have you fixed the issue? If not the first thing you should do is check the logs.Chris– Chris2021年08月12日 11:10:21 +00:00Commented Aug 12, 2021 at 11:10
-
I was able to solve that, check the answer. But there wasn't any useful info related to that.Shpend Palushi– Shpend Palushi2021年08月12日 12:16:36 +00:00Commented Aug 12, 2021 at 12:16
1 Answer 1
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
Comments
Explore related questions
See similar questions with these tags.