Simple Linux Panel
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mdserver-web/setting.py

33 lines
818 B

7 years ago
import os
import time
import sys
7 years ago
sys.path.append(os.getcwd() + '/class/core')
import public
7 years ago
import system_api
cpu_info = system_api.system_api().getCpuInfo()
7 years ago
if not os.path.exists(os.getcwd() + '/logs'):
os.mkdir(os.getcwd() + '/logs')
7 years ago
bt_port = public.readFile('data/port.pl')
bind = ['0.0.0.0:%s' % bt_port]
7 years ago
workers = cpu_info[1] + 1
7 years ago
threads = 1
backlog = 512
reload = False
daemon = False
timeout = 7200
keepalive = 1
chdir = os.getcwd()
7 years ago
capture_output = True
access_log_format = '%(t)s %(p)s %(h)s "%(r)s" %(s)s %(L)s %(b)s %(f)s" "%(a)s"'
loglevel = 'info'
errorlog = os.getcwd() + '/logs/error.log'
accesslog = os.getcwd() + '/logs/access.log'
pidfile = os.getcwd() + '/logs/mw.pid'
7 years ago
# if os.path.exists(chdir + '/data/ssl.pl'):
# certfile = 'ssl/certificate.pem'
# keyfile = 'ssl/privateKey.pem'