我正在使用Nginx和Gunicorn配置Django项目。
当我gunicorn mysite.wsgi:application --bind=127.0.0.1:8001在Nginx服务器中访问我的端口时,我在错误日志文件中收到以下错误;
2014/05/30 11:59:42 [暴击] 4075#0:* 6 connect()到127.0.0.1:8001失败(13:权限被拒绝)连接上游时,客户端:127.0.0.1,服务器:localhost,请求:“GET / HTTP / 1.1”,上游:"http://127.0.0.1:8001/",主机:“localhost:8080”
以下是我的nginx.conf文件内容;
server {
listen 8080;
server_name localhost;
access_log /var/log/nginx/example.log;
error_log /var/log/nginx/example.error.log;
location / {
proxy_pass http://127.0.0.1:8001;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $http_host;
}
}
在我得到的HTML页面中502 Bad Gateway。
我做错了什么?
慕田峪9158850
繁星coding