Chinaunix首页 | 论坛 | 博客
  • 博客访问: 63305
  • 博文数量: 29
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 397
  • 用 户 组: 普通用户
  • 注册时间: 2014-12-26 15:36
文章分类

全部博文(29)

文章存档

2016年(3)

2015年(13)

2014年(13)

我的朋友

分类: 系统运维

2015-04-16 18:37:51


参考:http://www.cnblogs.com/xiongpq/p/3381069.html


uwsgi 安装配置:


wget http://projects.unbit.it/downloads/uwsgi-1.4.9.tar.gz  或 
easy_install uwsgi 

tar zxf Django-1.6.5.tar.gz
python setup.py install
django-admin.py startproject monitor
cd monitor/
chmod a+x manage.py
django-admin.py startapp app01

yum -y install zlib-devel bzip2-devel pcre-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel

[root@dc0/usr/local/nginx/conf]# more /etc/uwsgi9090.ini
[uwsgi]
socket = 127.0.0.1:9090
master = true
vhost = true
no-stie = true
workers = 2
reload-mercy = 10
vacuum = true
max-requests = 1000
limit-as = 512
buffer-sizi = 30000
pidfile = /var/run/uwsgi9090.pid
daemonize = /var/www/monitor/uwsgi9090.log

more nginx.conf

server {
listen 80;
server_name localhost;

location /static {
alias /var/www/monitor/static ;
}
location / {
include uwsgi_params;
#必须和uwsgi中的设置一致
uwsgi_pass 127.0.0.1:9090;
#入口文件,即wsgi.py相对于项目根目录的位置,“.”相当于一层目录
uwsgi_param UWSGI_SCRIPT monitor.wsgi;
#项目根目录
uwsgi_param UWSGI_CHDIR /var/www/monitor;
index index.html index.htm;
client_max_body_size 35m;
}
}

阅读(778) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~