【发布时间】:2014-07-17 13:39:38
【问题描述】:
我正在使用 linux fedora,我将 nginx 安装为 sudo yum install nginx。我创建了一个 django 项目并将端口分配为 guicorn projectname.wsgi:application --bind=127.0.0.1:8001。我在 /etc/nginx/sites-enabled/default 中创建了一个文件
在我的default 文件中,我有以下代码:
server {
listen localhost:8006;
location / {
proxy_pass http://127.0.0.1:8001;
}
location /static/ {
autoindex on;
alias /home/user/Desktop/projects/28-05-2014/HMS/static/;
}
}
当我将我的 nginx 服务器主页检查为 localhost:80 时,它正在运行。但是当我调用 localhost:8006 时,它没有连接。当我检查与netstat -lnt | grep 80 的活动连接时,我发现只有 nginx 默认服务正在运行。我在做什么错误。任何帮助都会得到帮助
【问题讨论】:
-
你重新加载nginx了吗?
-
@AlexeyTen,是的,我已经重启了很多次
标签: python django nginx gunicorn