title: django+nginx+uwsig return 500
body: <p>I am using nginx+uwsgi to deploy my django app,everything is ok when I use django's self server,but when I use nginx+uwsgi,it will return 500 or 404 and diplay my custom 500 or 404 page.  </p>
  
  <p>I define the "static_root" in django setting and run "python collectstatic", the static file seems work well.</p>
  
  <p>my uwsgi ini file:</p>
  
  <pre><code>[uwsgi]                                                                                                                         │·
  project = api_security                                                                                                          │·
  base = /var/wd/App                                                                                                              │·
                                                                                                                                  │·
  chdir = %(base)/%(project)                                                                                                      │·
  # home = %(base)/Env/%(project)                                                                                                 │·
  module = %(project).wsgi:application                                                                                            │·
                                                                                                                                  │·
  master = true                                                                                                                   │·
  processes = 5                                                                                                                   │·
                                                                                                                                  │·
  # socket = %(base)/%(project)/%(project).sock                                                                                   │·
  socket = 127.0.0.1:8081                                                                                                         │·
  chmod-socket = 664                                                                                                              │·
  chown-socket = www:www                                                                                                          │·
  vacuum = true                                                                                                                   │·
  daemonize=/var/log/uwsgi/api_sec.log
  </code></pre>
  
  <p>my nginx config file:</p>
  
  <pre><code># configuration of the server                                                                                                   │·
  server {                                                                                                                        │·
      listen      10080;                                                                                                          │·
      server_name 10.213.11.54;                                                                                                   │·
      charset     utf-8;                                                                                                          │·
                                                                                                                                  │·
      access_log  /var/log/nginx/api_sec.access.log;                                                                              │·
      error_log  /var/log/nginx/api_sec.error.log debug;                                                                          │·
                                                                                                                                  │·
      client_max_body_size 75M;                                                                                                   │·
                                                                                                                                  │·
      location /static {                                                                                                          │·
          alias /var/wd/App/api_security/run/static;                                                                              │·
      }                                                                                                                           │·
                                                                                                                                  │·
      location / {                                                                                                                │·
          # uwsgi_pass  django;                                                                                                   │·
          # include    /usr/local/nginx/nginx/conf/uwsgi_params;                                                                  │·
          include         uwsgi_params;                                                                                           │·
          uwsgi_pass     127.0.0.1:8081;                                                                                          │·
      }
  </code></pre>
  
  <p>I use this config file in my other project,it works well, but in the project which access multiple ddatabase, it will display 404 or 500.  </p>
  
  <p>I see the error log of nginx and uwsgi, but I still have no idea about this question,I am stucked...</p>