uWSGI:找不到Python應用程式

uWSGI:找不到Python應用程式

當我使用命令運行我的應用程式時,python sorteerhoed.py && uwsgi --socket 0.0.0.0:5000 --protocol=http -w wsgi:app它運行良好,當我轉到伺服器 ip:5000 時,我可以看到我的頁面。但是當我嘗試使用 systemctl 來解除伺服器的守護程序時,它會啟動,但日誌會給出錯誤。http://prntscr.com/psyd02)如果我訪問我在 nginx 中設定的網站,它會顯示:“內部伺服器錯誤”

將此作為我的設定檔:

我的 nginx 設定檔: http://prntscr.com/psye25

我的 sorteerhoed.ini 檔案: http://prntscr.com/psyb1l

我的 sorteerhoed.service 檔案: http://prntscr.com/psybjq

我的 wsgi.py 檔案: http://prntscr.com/psyg2q

我按照本指南使用 nginx 安裝 uWSGI:https://www.digitalocean.com/community/tutorials/how-to-serve-flask-applications-with-uswgi-and-nginx-on-ubuntu-18-04 我已經嘗試使用不同的方法按照不同執行緒中的建議將我的應用程式匯入 wsgi.py 檔案中,但這不起作用。

相關內容