开发者社区> 问答> 正文

求指点:Djangonginxuwsgi部署显示502BadGateway

服务器:ubuntu 12.04
python版本:2.7.3
django版本:1.4.10
uwsgi版本:apt-get安装的版本


项目目录:


配置文件:
/alidata/www/QWY/qwy_wsgi.py:

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


/alidata/www/QWY/uwsgi.xml:

<uwsgi>  
  <socket>127.0.0.1:8000</socket>  
  <listen>20</listen>  
  <master>true</master>  
  <pidfile>/alidata/server/nginx/uwsgi.pid</pidfile>  
  <processes>2</processes>  
  <module>qwy_wsgi</module>
  <pythonpath>/alidata/www/QWY</pythonpath>
  <profiler>true</profiler>  
  <memory-report>true</memory-report>  
  <enable-threads>true</enable-threads>  
  <logdate>true</logdate>  
  <limit-as>6048</limit-as>  
</uwsgi>


/alidata/server/nginx/conf/vhosts/qingwenyi.conf:

server {
        listen       80;
        server_name  localhost;


    location /{
        root /alidata/www/QWY;
        uwsgi_pass  127.0.0.1:8000;
        include uwsgi_params;
    }
    
    #伪静态规则
    access_log  /alidata/log/nginx/access/default.log;
}


错误:


502 Bad Gateway




nginx/1.2.5


展开
收起
tyly 2014-04-07 17:07:13 7575 0
0 条回答
写回答
取消 提交回答
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载