1

这是我的 nginx.conf:

server {
    listen 80;

    location /proxy {
        proxy_pass http://0.0.0.0:8001;     
    }
}

我的服务器是天蓝色的虚拟机。

当我去http://13.65.102.226/proxy/时,它给出了 404 not found 。

这是我的supervisord.conf:

[program:runworker]
command=python /var/www/app/manage.py runworker
stopsignal=KILL
killasgroup=true

[program:daphne]
command=daphne -b 0.0.0.0 -p 8001 app.asgi:channel_layer -v2

[supervisord]
logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log)
pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
childlogdir=/var/log/supervisor            ; ('AUTO' child log dir, default $TEMP)

有什么建议么?

4

1 回答 1

2

我猜 Nginx 和 Daphne 在同一台服务器上运行。如果是这样,请尝试:

proxy_pass http://127.0.0.1:8001;
于 2017-07-14T09:20:20.533 回答