[英]Running Flask app with uwsgi and nginx
I am following the digital ocean tutorial for configuring nginx uwsgi to serve flask application. 我正在遵循有关配置Nginx uwsgi来服务烧瓶应用程序的数字海洋教程。 Digital Ocean Tuttorial link I have made the service for starting my application.But when i run it, i get the following status Digital Ocean Tuttorial链接我已经提供了启动我的应用程序的服务。但是当我运行它时,我得到以下状态
Process: 726 ExecStart=/home/user/app/my_project/venv/bin/uwsgi --ini my_project.ini (code=exited, status=217/USER) 进程:726 ExecStart = / home / user / app / my_project / venv / bin / uwsgi --ini my_project.ini(代码=已退出,状态= 217 / USER)
myproject.ini contains configuration for running uwsgi myproject.ini包含用于运行uwsgi的配置
[uwsgi]
module = wsgi
master = true
processes = 5
socket = myproject.sock
chmod-socket = 660
vacuum = true
die-on-term = true
I am able to run app with uswgi on port 8000 but not able to redirect requests from nginx to uwsgi. 我能够在端口8000上使用uswgi运行应用程序,但无法将请求从Nginx重定向到uwsgi。
Configuration for nginx is: nginx的配置为:
server {
listen 80;
server_name my_ip;
location / {
include uwsgi_params;
uwsgi_pass unix:/home/user/app/my_project/myproject.sock;
}
}
我发现这是一个权限问题,套接字权限应为666。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.