找不到Python应用程序[digitalocean、ubuntu 1604、uWSGI、Nginx]

找不到Python应用程序[digitalocean、ubuntu 1604、uWSGI、Nginx],ubuntu,nginx,ubuntu-16.04,uwsgi,digital-ocean,Ubuntu,Nginx,Ubuntu 16.04,Uwsgi,Digital Ocean,我在任何地方都找不到帮助。我第一次尝试在digitalocean上启动flask应用程序,但一直遇到“找不到应用程序”错误,似乎无法理解为什么它无法检测到我的应用程序 uWSGI: [Unit] Description=uWSGI items rest [Service] Environment=DATABASE_URL=mysql://johndoe:pw@localhost:3306/johndoe ExecStart=/var/www/html/dir/venv/bin/uwsgi --

我在任何地方都找不到帮助。我第一次尝试在digitalocean上启动flask应用程序,但一直遇到“找不到应用程序”错误,似乎无法理解为什么它无法检测到我的应用程序

uWSGI:

[Unit]
Description=uWSGI items rest

[Service]
Environment=DATABASE_URL=mysql://johndoe:pw@localhost:3306/johndoe
ExecStart=/var/www/html/dir/venv/bin/uwsgi --master --emperor /var/www/html/dir/uwsgi.ini --die-on-term --uid johndoe --gid johndoe --logto /var/www/html/dir/log/emperor.log
Restart=always
KillSignal=SIGQUIT
Type=notify
NotifyAccess=all

[Install]
WantedBy=multi-user.target
uWSGI配置:

[uwsgi]
base = /var/www/html/dir
app = run
module = %(app)

home = %(base)/venv
pythonpath = %(base)

socket = %(base)/socket.sock

chmod-socket = 777

processes = 8

threads = 8

harakiri = 15

callable = app

logto = /var/www/html/dir/log/%n.log
Nginx配置:

server {
listen 80;
real_ip_header X-Forwarded-For;
set_real_ip_from 127.0.0.1;
server_name localhost;

location / {
include uwsgi_params;
uwsgi_pass unix:/var/www/html/dir/socket.sock;
uwsgi_modifier1 30;
}
}
run.py:

from app import app
from db import db
db.init_app(app)

@app.before_first_request
def create_tables():
    db.create_all()
app.py:

(condensed to just show appp and database)
app = Flask(__name__)
app.config["SQLALCHEMY_DATABASE_URI"] = os.environ.get('DATABASE_URL')
uwsgi的错误日志中的错误消息:

--- no python application found, check your startup logs for errors ---
[pid: 6797|app: -1|req: -1/2] ip () {44 vars in 724 bytes} 
[Sat Jun  2 20:21:30 2018] GET /favicon.ico => generated 21 bytes in .    0 msecs (HTTP/1.1 500) 2 headers in 83 bytes (1 switches on core 0)
announcing my loyalty to the Emperor...

你能把实际的错误信息添加到你的问题中吗?它将给出问题所在的指示。补充,谢谢@dannagle