-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathuwsgi.ini
43 lines (33 loc) · 1.14 KB
/
uwsgi.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
[uwsgi]
# =============================================== 实际使用到的uwsgi配置文件
# application's base folder
base = /var/www/app
# python module to import 加载指定的python WSGI模块(模块路径必须在PYTHONPATH里)
module = app
# the variable that holds a flask application inside the module imported at line #6
# 设置在收到请求时,uWSGI加载的模块中哪个变量将被调用,默认是名字为“application”的变量
callable = app
# http
http = 0.0.0.0:5000
http-keepalive = 1
add-header=Connection: Keep-Alive
http-timeout=120
http-connect-timeout=5
# 开启多线程
#enable-threads = true
# 启用进程数 set env WORKERS = 4
workers = 4
# 日志文件
logto = /var/www/app/log/app.log
# Use the ip from X-Forwarded-For header instead of REMOTE_ADDR. Used when uWSGI is run behind multiple proxies.
log-x-forwarded-for
# log requests with a 5xx response
log-5xx = true
# 在失去权限前,使用chdir()到指定目录
chdir = /var/www/app
# 缓冲区大小
buffer-size = 8192
# 启动状态服务器,用于查看uwsgi服务的状态
stats = /tmp/stats.socket
# max requests num
max-requests = 100