在将uwsgi与uwsgi-file参数一起使用时,我可以在127.0.0.1/hello.py看到正确呈现的页面:
plugin = python3
master = true
processes = 5
chdir = /var/www/web1/
http = 127.0.0.1:9090
wsgi-file = /var/www/web1/hello.py
stats = 127.0.0.1:9191
chmod-socket = 777
vacuum = true
enable-threads = true
die-on-term = true
但是当我使用
从nginx反向代理时location ~ \.py$ {
try_files $uri /index.py =404;
proxy_pass http://127.0.0.1:9090;
include uwsgi_params;
}
并禁用uwsgi-file参数:
plugin = python3
master = true
processes = 5
chdir = /var/www/web1/
http = 127.0.0.1:9090
#wsgi-file = /var/www/web1/hello.py
stats = 127.0.0.1:9191
chmod-socket = 777
vacuum = true
enable-threads = true
die-on-term = true
然后我得到这些错误:
浏览器-“内部服务器错误”
nginx控制台-“ GET /hello.py HTTP / 1.1” 500 32
uwsgi控制台-“ GET /hello.py =>在0毫秒(HTTP / 1.0 500)中生成了21个字节,在83个字节中生成了2个报头(核心0上的0个开关)”
请给我一些帮助进行故障排除