I try to start nginx web server with uwsgi and python django at backend system ubuntu 12.04
but get 502 Bad Gateway and -- unavailable modifier requested: 1 -- in logs
my nginx file configs:
server {
listen 80;
server_name site.com;
charset utf-8;
access_log /var/log/nginx/tona-access.log;
error_log /var/log/nginx/tona-error.log;
client_max_body_size 100m;
location /main_media/ {
alias /home/se7en/workspace/tona/main_media/;
expires 30d;
}
location / {
include /etc/nginx/uwsgi_params;
fastcgi_pass unix:///var/tmp/tona_uwsgi.sock;
}
}
my uwsgi start and console outputs:
root@tona:/etc/nginx/sites-enabled# uwsgi --uid www-data --file uwsgi_app.py --plugins python --chdir /home/se7en/workspace/tona/ --pythonpath /home/se7en/workspace/tona/ --module uwsgi_app -c application --limit-as 128 -p 3 -M -s /var/tmp/tona_uwsgi.sock
./python_plugin.so: cannot open shared object file: No such file or directory
*** Starting uWSGI 1.2.5 (32bit) on [Sat Aug 25 16:58:02 2012] ***
compiled with version: 4.6.3 on 24 August 2012 22:03:24
detected number of CPU cores: 1
current working directory: /etc/nginx/sites-enabled
detected binary path: /usr/local/bin/uwsgi
setuid() to 33
limiting address space of processes...
your process address space limit is 134217728 bytes (128 MB)
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
uwsgi socket 0 bound to UNIX address /var/tmp/tona_uwsgi.sock fd 3
Python version: 2.7.3 (default, Aug 1 2012, 05:27:35) [GCC 4.6.3]
*** Python threads support is disabled. You can enable it with --enable-threads ***
Python main interpreter initialized at 0x9521058
your server socket listen backlog is limited to 100 connections
*** Operational MODE: preforking ***
added /home/se7en/workspace/tona/ to pythonpath.
WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x9521058 pid: 5764 (default app)
mountpoint already configured. skip.
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI master process (pid: 5764)
spawned uWSGI worker 1 (pid: 5765, cores: 1)
spawned uWSGI worker 2 (pid: 5766, cores: 1)
spawned uWSGI worker 3 (pid: 5767, cores: 1)
-- unavailable modifier requested: 1 --
-- unavailable modifier requested: 1 --
-- unavailable modifier requested: 1 --
-- unavailable modifier requested: 1 --
my uwsgi_app.py file:
import os
import sys
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()