乙個uwsgi配置示例

2021-06-19 14:22:37 字數 2288 閱讀 5537

摘自:

01

02python

03127.0.0.1:9001

04

05>

06

07

08

094

108

111

122000

13512

14256

15192

16

17

18

uwsgi配置檔案中的引數也可以在命令列通過uwsgi指定,配置檔案除了xml格式外,還可以寫成ini格式的,軟體包安裝完畢後在

/usr/share/doc/uwsgi/examples/conffile目錄下會有一些xml和ini格式配置檔案的例子。

wsgi_configuration_module.py指令碼內容

01#!/usr/bin/python

02importos

03importsys

04)

05os.environ['python_egg_cache'] ='/var/www/example/.python-egg'

06

07status ='200 ok'

08output ='hello world!'

09response_headers = [('content-type','text/plain'),

10('content-length', str(len(output)))]

11start_response(status, response_headers)

12return[output]

啟動uwsgi

1

除了直接用uwsgi命令啟動外,還可以用init.d下的指令碼啟動,

不過需先修

改/etc/default/u

wsgi中預設配置檔案的路徑,然後通過/etc/init.d/uwsgi start啟動

1#inherited_config=/usr/share/uwsgi/conf/default.ini

2

乙個PlaySound示例

using system using system.collections using system.componentmodel using system.runtime.interopservices internal class helpers dllimport winmm public s...

xml的乙個示例

function.h cstring openfile cstring cstring getcontext cstring,int,int void str2array cstring struct xmlnode function.cpp include include include incl...

乙個示例儲存過程

create or replace procedure bm add p id varchar,p name varchar is v count number begin 檢查輸入引數是否為空 if p id is null or p name is null then p out 輸入的值為空!...