wkt's blog
非学无以致疑,非问无以广识

uwsgi+flask

admin~2018年9月5日 /flask/笔记

uwsgi:

uwsgi.ini at project directory

[uwsgi]
socket = 127.0.0.1:5000
chdir = /home/wukt/project/ziru/zr
wsgi-file = run.py
callable = app
processes = 4
threads = 2
stats = 127.0.0.1:9191

nginx:

a.com.conf or nginx.conf

server {
      listen 80; 
      server_name a.com;
      access_log /data/wwwlogs/a.com_nginx.log combined;
      index index.html index.htm index.php;
      root /data/wwwroot/a.com;
      include /usr/local/nginx/conf/rewrite/none.conf;
      #error_page 404 /404.html;
      #error_page 502 /502.html;
    location / { 
        include /usr/local/nginx/conf/uwsgi_params;
        uwsgi_pass 127.0.0.1:5000;  # 指向uwsgi 所应用的内部地址,所有请求将转发给uwsgi 处理
    }
}
~      

run

uwsgi –ini uwsgi.ini


my sogou input is crashed!

发表评论

电子邮件地址不会被公开。