标签:com http c tar t sp art get set 文件 load
1、下载最新稳定版uwsgi,地址为: wget http://projects.unbit.it/downloads/uwsgi-1.9.13.tar.gz
2、解压 tar zxvf uwsgi-1.9.13.tar.gz
3、cd uwsgi-1.9.13 && make
4、移动uwsgi到bin目录,方便调用 mv ./uwsgi /usr/bin
5、进入用户目录建立projectname.ini文件,内容为:
[uwsgi]
socket =
127.0.0.1:3031
chdir = /home/foobar/myproject/
pythonpath = ..
env =
DJANGO_SETTINGS_MODULE=myproject.settings
module =
django.core.handlers.wsgi:WSGIHandler()
processes = 4
threads = 2
stats
= 127.0.0.1:9191
6、配置nginx
cd /etc/nginx/conf.d vi projectname.ini 输入以下内容:
server
{
listen 80;
server_name: www.domain.com
location / {
include
uwsgi_params;
uwsgi_pass 127.0.0.1:3031;
}
}
7、重启nginx service nginx restart
8、uwsgi 用户目录/projectname.ini
centos和redhat下 uwsgi配置,码迷,mamicode.com
标签:com http c tar t sp art get set 文件 load
原文地址:http://www.cnblogs.com/jeffsun/p/3695668.html