2012-08-07 5 views
0

나는 둘 다 새로운데 황제를 사용하여 장고 뼈대 앱 2 개를 실행해야한다. (단지 "작동한다!"페이지를 보자.) 시도하고 싶다 황제. (어떻게 작동하는지 더 잘 이해하기 위해)Nginx + uWSGI 기본 설정

내 nginx.conf :

[uwsgi] 
http = :8001 
chdir = /home/john/www/example.com/example 
module = example.wsgi 
master = True 
home = /home/john/Envs/example.com 

: uwsgi.ini 존재로

$ uwsgi --ini /home/john/www/example.com/uwsgi.ini 

: I에 의해 uWSGI 시작

# snipped... 
server { 
    listen 92; 
    server_name example.com; 
    access_log /home/john/www/example.com/logs/access.log; 
    error_log /home/john/www/example.com/logs/error.log; 

    location/{ 
    include uwsgi_params; 
    uwsgi_pass 127.0.0.1:8001; 
    } 
} 
# snipped... 

그리고 uwsgi 및 nginx가 실행 중이면 localhost:8001에 액세스 할 수 있지만 localhost:92은 액세스 할 수 없습니다.

무엇이 누락 되었습니까?

미리 감사드립니다.

답변

1

uwsgi 프로세스에 http 프로토콜을 사용하여 응용 프로그램을 제공 할 것을 말합니다. 이 기능은 주로 개발자 편의를위한 것입니다. 대신 uwsgi 프로토콜을 사용하도록 지정해야합니다.

[uwsgi] 
protocol = uwsgi 
socket = 127.0.0.1:8001 
chdir = /home/john/www/example.com/example 
module = example.wsgi 
master = True 
home = /home/john/Envs/example.com 
관련 문제