第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

Python2.7 flask uwsgi nginx配置找不到unable to load app 0

Python2.7 flask uwsgi nginx配置找不到unable to load app 0

收到一只叮咚 2019-05-21 11:35:27
我有一個(gè)騰訊云的服務(wù)器,使用flask,uwsgi,nginx來(lái)搭建一個(gè)服務(wù)器。按照網(wǎng)上的方法是這樣寫(xiě)的。我的nginx配置是我修改的是這個(gè)文件/etc/nginx/sites-enabled/defaultserver{listen80;server_name111.230.140.182;charsetutf-8;client_max_body_size75M;location/{includeuwsgi_params;uwsgi_pass127.0.0.1:8080;uwsgi_paramUWSGI_PYTHON/usr/bin/python;uwsgi_paramUWSGI_CHDIR/home/ubuntu/project/test;uwsgi_paramUWSGI_SCRIPTtest:app;}}然后我的uwsgi.ini配置是這么寫(xiě)的:[uwsgi]socket=127.0.0.1:8080plugins=pythonchidir=/home/ubuntu/project/testwsgi-file=/home/ubuntu/project/test/test.pycallable=app#程序變量名protocol=httpmodule=testprocesses=4threads=2然后我的test.py是這么寫(xiě)的:fromflaskimportFlaskapp=Flask(__name__)@app.route('/')defindex():return'helloworld!'if__name__=='__main__':app.run(debug=True)我先是運(yùn)行nginx,然后在運(yùn)行uwsgi,但是會(huì)報(bào)這個(gè)錯(cuò)誤:mapped332288bytes(324KB)for8coresOperationalMODE:preforking+threadedunabletoloadapp0(mountpoint='')(callablenotfoundorimporterror)unabletofind"application"callableinfile/home/ubuntu/project/test/test.pyunabletoloadapp0(mountpoint='')(callablenotfoundorimporterror)我也查了不少文章都沒(méi)有解決我這個(gè)問(wèn)題。特來(lái)求教!謝謝大家?。?
查看完整描述

2 回答

  • 2 回答
  • 0 關(guān)注
  • 696 瀏覽
慕課專(zhuān)欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢(xún)優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)