(13:權限被拒絕)連接到上游時:[nginx] - (13: Permission denied) while connecting to upstream:[nginx]

語言: CN / TW / HK

問題:

I am working with configuring Django project with Nginx and Gunicorn.我正在使用 Nginx 和 Gunicorn 配置 Django 項目。

While I am accessing my port gunicorn mysite.wsgi:application --bind=127.0.0.1:8001 in Nginx server, I am getting the following error in my error log file;當我在 Nginx 服務器中訪問我的端口gunicorn mysite.wsgi:application --bind=127.0.0.1:8001時,我在錯誤日誌文件中收到以下錯誤;

2014/05/30 11:59:42 [crit] 4075#0: *6 connect() to 127.0.0.1:8001 failed (13: Permission denied) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8001/" , host: "localhost:8080" 2014/05/30 11:59:42 [crit] 4075#0: *6 connect() to 127.0.0.1:8001 連接到上游時失敗(13:權限被拒絕),客户端:127.0.0.1,服務器:本地主機,請求:“GET / HTTP/1.1”,上游: "http://127.0.0.1:8001/" ,主機:“localhost:8080”

Below is the content of my nginx.conf file;下面是我的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;
    }
}

In the HTML page I am getting 502 Bad Gateway .在 HTML 頁面中,我收到502 Bad Gateway

What mistake am I doing?我在做什麼錯誤?


解決方案:

參考一: http://stackoom.com/question/1cU6Z
參考二: (13: Permission denied) while connecting to upstream:[nginx]
「其他文章」