天天看點

centos上配置uwsgi

1、安裝uwsig

先下載下傳uwsgi,下載下傳位址:http://uwsgi-docs.readthedocs.org/en/latest/Download.html

下載下傳後解壓縮,然後安裝uwsgi:

pip install uwsgi      

2、應用

建立python腳本test.py

def application(env, start_response):
    start_response('200 OK', [('Content-Type','text/html')])
    return "Hello World"      

啟用服務:

uwsgi --http :9090 --wsgi-file test.py      

打開浏覽器 http://127.0.0.1:9090 測試正常。

繼續閱讀