diff --git a/plugins/python/wsgi_handlers.c b/plugins/python/wsgi_handlers.c index 20c6dfeab..eb389856c 100644 --- a/plugins/python/wsgi_handlers.c +++ b/plugins/python/wsgi_handlers.c @@ -384,8 +384,12 @@ int uwsgi_request_wsgi(struct wsgi_request *wsgi_req) { if (wsgi_req->app_id == -1) { - uwsgi_500(wsgi_req); - uwsgi_log("--- no python application found, check your startup logs for errors ---\n"); + if (uwsgi.no_default_app) { + uwsgi_404(wsgi_req); + } else { + uwsgi_500(wsgi_req); + uwsgi_log("--- no python application found, check your startup logs for errors ---\n"); + } goto clear2; }