【发布时间】:2015-10-09 17:55:26
【问题描述】:
我想在使用 centOS 7 的服务器上部署我的烧瓶服务。所以我按照本教程进行操作 - https://www.digitalocean.com/community/tutorials/how-to-serve-flask-applications-with-uwsgi-and-nginx-on-centos-7。
运行systemctl start nginx 命令后,我得到了这个错误:
nginx: [emerg] bind() to 0.0.0.0:5000 failed (13: Permission denied)
我的nginx.conf 文件:
server {
listen 5000;
server_name _;
location / {
include uwsgi_params;
uwsgi_pass unix:/root/fiproxy/fiproxyproject/fiproxy.sock;
}
}
注意: 烧瓶服务和 wsgi 工作正常。我尝试使用超级用户运行 nginx,但错误仍然存在。
【问题讨论】:
-
你用 root 用户运行 systemctl 命令?因为这是我能想到的权限被拒绝错误的唯一原因