diff --git a/conf.json b/conf.json new file mode 100644 index 0000000..3286d71 --- /dev/null +++ b/conf.json @@ -0,0 +1 @@ +{"settings":{"http":{"header_read_timeout":30,"body_read_timeout":30,"send_timeout":30,"idle_timeout":180,"max_body_size":10485760,"static":{"mime_types":{"text/plain":[".log","README","CHANGES"]}},"discard_unsafe_fields":false}},"listeners":{"*:80":{"pass":"routes"}},"routes":[{"match":{"uri":"/static/*"},"action":{"share":"/home/data/www$uri"}},{"action":{"pass":"applications/pthelper"}}],"applications":{"pthelper":{"type":"python 3","protocol":"wsgi","path":"/home/data/www/","processes":2,"module":"pthelper.wsgi","environment":{"DJANGO_SETTINGS_MODULE":"pthelper.settings"}}}} \ No newline at end of file diff --git a/start.sh b/start.sh index 526592d..a62530b 100644 --- a/start.sh +++ b/start.sh @@ -2,7 +2,6 @@ #初始化数据库 python3 manage.py migrate -python3 manage.py runserver 0.0.0.0:80 -#gunicorn pthelper.wsgi:application --bind 0.0.0.0:8000 -w 4 --threads 2 --daemon +#python3 manage.py runserver 0.0.0.0:80 -#nginx -g 'daemon off;' \ No newline at end of file +/usr/sbin/unitd --no-daemon --control 0.0.0.0:60081 --user root --group root \ No newline at end of file