forked from catkutay/WagtailLivingArchive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
uwsgi.ini
36 lines (36 loc) · 1.1 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
[uwsgi]
user = www-data
project = livingarchive
#使用nginx连接时使用
#socket = /tmp/%(project).sock
socket = 127.0.0.1:8000
#直接做web服务器使用 python manage.py runserver ip:port
#http=0.0.0.0:8000
env = DJANGO_SETTINGS_MODULE=%(project).settings.dev
#module = "django.core.handlers.wsgi:WSGIHandler()"
#项目目录
chdir = /var/www/html/%(project)
#项目中wsgi.py文件的目录,相对于项目目录
wsgi-file = /var/www/html/%(project)/%(project)/wsgi.py
#指定启动的工作进程数
processes = 2
#指定工作进程中的线程数
threads = 2
#指定在这些进程里有一个主进程
master = True
#保存启动之后主进程的pid
pidfile = %(project).pid
#设置uwsgi后台运行,uwsgi.log保存日志信息
daemonize = %(project).log
processes = 5
#设置日志文件最大字节数
log-maxsize = 100000
#设置每个进程最大请求数
max-requests = 1000
#设置虚拟环境的路径
virtualenv = /var/www/html/livingarchive/venv
home = /var/www/html/livingarchive/venv
chmod-socket = 666
chown-socket = %(user):www-data
module = %(project).wsgi:application
STATIC_URL = './static/'