gpt4 book ai didi

azure - nginx 作为 daphne 的反向代理 : 404 not found

转载 作者:行者123 更新时间:2023-12-03 01:47:03 24 4
gpt4 key购买 nike

这是我的 nginx.conf:

server {
listen 80;

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

我的服务器是azure中的虚拟机。

当我访问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)

有什么建议吗?

最佳答案

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

proxy_pass http://127.0.0.1:8001;

关于azure - nginx 作为 daphne 的反向代理 : 404 not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45076216/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com