(13:權限被拒絕)連接到上游時:[nginx] - (13: Permission denied) while connecting to upstream:[nginx]
問題:
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]
- 用 JavaScript 計算昨天的日期 - Calculate the date yesterday in JavaScript
- 允許保留 2 位小數 - Allow 2 decimal places in
- 在 Android 上防止屏幕旋轉 - Prevent screen rotation on Android
- 如何更新 RecyclerView 適配器數據 - How to update RecyclerView Adapter Data
- 日曆重複/重複事件 - 最佳存儲方法 - Calendar Recurring/Repeating Events - Best Storage Method
- (13:權限被拒絕)連接到上游時:[nginx] - (13: Permission denied) while connecting to upstream:[nginx]
- 如何使用 git 檢查 GitHub 拉取請求? - How can I check out a GitHub pull request with git?
- 正則表達式:刪除包含“幫助”等的行 - Regex: Remove lines containing “help”, etc
- >>>和>>之間的區別 - Difference between >>> and >>
- JavaScript 中反引號 (`) 的用法 - Usage of the backtick character (`) in JavaScript
- C 模板typedef - C template typedef
- 僅添加非空白更改 - Add only non-whitespace changes
- Python中exit()和sys.exit()之間的區別 - Difference between exit() and sys.exit() in Python
- Git:僅列出“未跟蹤”的文件(還有自定義命令) - Git: list only “untracked” files (also, custom commands)
- 谷歌使用什麼數據庫? - What database does Google use?
- 在CLR中投放與使用'as'關鍵字 - Casting vs using the 'as' keyword in the CLR
- 值對的 Java 集合? (元組?) - A Java collection of value pairs? (tuples?)
- 'git 責備' 有什麼作用? - What does 'git blame' do?
- 螞蟻警吿:“'includeantruntime'未設置” - ant warning: “'includeantruntime' was not set”
- 如何在不等待的情況下安全地調用 C# 中的異步方法 - How to safely call an async method in C# without await