2012-08-25 5 views
2

내가 백엔드 시스템 우분투 12.04파이썬의 nginx uwsgi - 사용할 수없는 수정 요청 : 1-

에 uwsgi 및 파이썬 장고와의 nginx 웹 서버를 시작하지만, 502 잘못된 게이트웨이 및 을 얻으려고 - 사용할 수없는 수정 요청 : 1 - 로그에

내 nginx를 파일 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; 

} 


} 

내 uwsgi 시작 및 콘솔 출력 :

[email protected]:/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 -- 

내 uwsgi_app.py 파일 :

import os 
import sys 
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' 
import django.core.handlers.wsgi 
application = django.core.handlers.wsgi.WSGIHandler() 

답변

0

당신이 (즉, --socket에 대한 바로 가기입니다) -s 대신 --fastcgi 소켓을 사용하여 FastCGI 모드에서 uWSGI을 설정해야

관련 문제