相关疑难解决方法(0)

(13:权限被拒绝)连接上游时:[nginx]

我正在使用nginx和gunicorn配置django项目.当我gunicorn mysite.wsgi:application --bind=127.0.0.1:8001在nginx服务器中访问我的端口时,我在错误日志文件中收到以下错误.

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;
    }
}
Run Code Online (Sandbox Code Playgroud)

我的"http://127.0.0.1:8001/"档案

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;
    }
}
Run Code Online (Sandbox Code Playgroud)

在我得到的html页面中nginx.conf.

我做错了什么?

django nginx python-2.7 gunicorn

256
推荐指数
8
解决办法
14万
查看次数

标签 统计

django ×1

gunicorn ×1

nginx ×1

python-2.7 ×1