Search code examples
pythonnginxamazon-ec2gunicorndjango-mysql

I can't start gunicorn on AWS EC2


I was going to update to using sqlite database into the mysql database on my django project. after replaced settings.py like bellow:

` DATABASES = {

   'default': {
       'ENGINE': 'django.db.backends.mysql',
       'NAME': '*',
       'USER': '*',
       'PASSWORD': '*',
       'HOST': 'localhost',
       'PORT': '***',

   }

}

then I excuted this command systemctl restart gunicorn

here is the screenshot:

EC2 screebshot


Solution

  • You need to check Nginx configuration on your OS. The error says that the configuration was incorrect.