通过 pip 安装 uWSGI 程序
pip install uwsgi 编写测试脚本,测试uWSGI是否正常 1 vim test.py 2 3 def application(env, start_response): 4 start_response('200 OK', [('Content-Type','text/html')]) 5 return [b"Hello World"]通过 uWSGI 启动 test.py 测试程序
uwsgi --http :9090 --wsgi-file test.py
浏览器访问 ip:9090 是否返回Hello World
配置文件示例
[uwsgi] #socket = 127.0.0.1:3031 socket = /tmp/jms_uwsgi.socket chdir = /app/jumpserver/ wsgi-file = jumpserver/wsgi.py processes = 4 threads = 2 #stats = 127.0.0.1:9191 master = true pidfile = /tmp/jms_uwsgi.pid daemonize = /var/log/jms_uwsgi.log log-maxsize = 50000000 vacuum = true disable-logging = true View Code
转载于:https://www.cnblogs.com/yangzhiquan/p/6225868.html
