Answer the question
In order to leave comments, you need to log in
Why error when using uwsgi + nginx?
Good afternoon.
When you run the python manage.py runserver project, everything works fine.
And when through a bunch of nginx + uwsgi , then such an error comes out when checking the authorization login.
OperationalError at /accounts/login/
(1045, "Access denied for user 'user'@'localhost' (using password: YES)")
Request Method: POST
Request URL: http://server/accounts/login/
Django Version: 1.6.12
Exception Type: OperationalError
Exception Value:
(1045, "Access denied for user 'user'@'localhost' (using password: YES)")
Exception Location: /usr/lib64/python2.7/site-packages/MySQLdb/connections.py in __init__, line 187
Python Executable: /usr/bin/uwsgi
url(r'^accounts/login/$','django.contrib.auth.views.login'),
Answer the question
In order to leave comments, you need to log in
Somewhere in the wsgi settings is not the correct path, make sure that the settings of your project are imported in the wsgi.py file
# -*- coding: utf-8 -*-
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "app.settings")
application = get_wsgi_application()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question