add uwsgi files

This commit is contained in:
wrmswindmill 2018-08-20 13:52:27 +08:00
parent 41bfe77314
commit 9a09d1f586
5 changed files with 6645 additions and 0 deletions

4
utest.py Normal file
View File

@ -0,0 +1,4 @@
def application(env, start_response):
start_response('200 OK', [('Content-Type','text/html')])
# return ["Hello World"] # python2
return [b"Hello World"] # python3

34
uwsgi.ini Normal file
View File

@ -0,0 +1,34 @@
[uwsgi]
# 使用nginx连接时使用
#socket = 0:8000
# 直接做web服务器使用
#http = 0:8000
# 项目目录
chdir = /projects/codepedia/codepedia2/
# 项目中wsgi.py文件的目录
wsgi-file = /projects/codepedia/codepedia2/Codepedia2/wsgi.py
# 主进程
master = true
# 多进程&多线程
processes = 6
threads = 2
# .sock文件目录需与Nginx文件内的配置相同
socket = /projects/codepedia/codepedia2/my_sock.sock
chmod-socket = 666
# 以守护进程的方式启动
vacuum = true
# 存储pid进程
pidfile=uwsgi.pid
# 存储log日志
daemonize=uwsgi.log

6589
uwsgi.log Normal file

File diff suppressed because it is too large Load Diff

1
uwsgi.pid Normal file
View File

@ -0,0 +1 @@
26142

17
uwsgi_params Normal file
View File

@ -0,0 +1,17 @@
uwsgi_param QUERY_STRING $query_string;
uwsgi_param REQUEST_METHOD $request_method;
uwsgi_param CONTENT_TYPE $content_type;
uwsgi_param CONTENT_LENGTH $content_length;
uwsgi_param REQUEST_URI $request_uri;
uwsgi_param PATH_INFO $document_uri;
uwsgi_param DOCUMENT_ROOT $document_root;
uwsgi_param SERVER_PROTOCOL $server_protocol;
uwsgi_param REQUEST_SCHEME $scheme;
uwsgi_param HTTPS $https if_not_empty;
uwsgi_param REMOTE_ADDR $remote_addr;
uwsgi_param REMOTE_PORT $remote_port;
uwsgi_param SERVER_PORT $server_port;
uwsgi_param SERVER_NAME $server_name;