zoukankan      html  css  js  c++  java
  • django centos7部署 之nginx + uwsgi配置参数

    亲测,可用!!!!!!!!!!!!!!!!!!!!

    python3.5

    uwsgi2.0.15

    django 1.11

    nginx 配置

    upstream django {
    	server 127.0.0.1:9090;
    }
    
     server {
            listen       80;
            server_name  localhost;
    	charset utf-8;
            #charset koi8-r;
    
            #access_log  logs/host.access.log  main;
    
            location / {
    	    proxy_pass  http://django;
            }
        location /static {                                                                                             
            alias /home/nginx-logs/untitled1/myfirst/static;
        }
    }

    在manage.py同级目录中新建uwsgi.ini

    uwsgi

    [uwsgi]
    chdir=/home/untitled1
    http=127.0.0.1:9090
    processes=4
    harakiri=200
    max-request=5000
    pythonpath=/home/untitled1
    wsgi-file=/home/untitled1/untitled1/wsgi.py
    daemonize=/var/log/uwsgi9090.log
    master=true
    procname-prefix=untitled1_
    procname-master=untitledi1master

    启动

    uwsgi --ini uwsgi.ini

    重载nginx配置文件

    END!

  • 相关阅读:
    linux读写锁
    正则表达式
    C++原型模式和模板模式
    C++外观模式和组合模式
    C++代理模式
    c++桥接模式
    Linux常用命令history/tcpdump/awk/grep
    C++委托模式
    c++ 读写锁
    布衣客
  • 原文地址:https://www.cnblogs.com/changbo/p/6739912.html
Copyright © 2011-2022 走看看