2014-12-04 88 views
0

uwsgi中的wsgi-filefile選項之間有什麼區別?我知道wsgi-file附帶python插件包,fileuwsgi的標準選項。uwsgi差異--wsgi文件和 - 文件

這個工程: $ uwsgi --socket 127.0.0.1:3031 --plugins=python2 --file /srv/http/site/run.py --callable app

這並不: $ uwsgi --socket 127.0.0.1:3031 --plugins=python2 --wsgi-file /srv/http/site/run.py --callable app

unable to load app 0 (mountpoint='') (callable not found or import error)

幾件事情產生的燒瓶中的應用與uwsgi時,我注意到這確實: $ cd /srv/http/site

$ uwsgi --socket 127.0.0.1:3031 --plugins=python2 --wsgi-file run:app

我的設置是這樣的:

site /run.py /app /__init__.py /static /style.css /templates layout.html index.html login.html ...

Apparantly,該wsgi-file選項不能使用絕對路徑和贖回,或工作我錯過了什麼大事?

回答

0

沒關係,只需在項目文件夾中添加一個--chdir即可修復所有問題。