Reputation: 361
Here's my nginx.conf:
server {
listen 80;
location /proxy {
proxy_pass http://0.0.0.0:8001;
}
}
My server is virtual machine in azure.
When I go to http://13.65.102.226/proxy/ , it gives 404 not found.
and here's my 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)
Any suggestions?
Upvotes: 1
Views: 622
Reputation: 2292
I guess Nginx and Daphne are running on the same server. If so, try:
proxy_pass http://127.0.0.1:8001;
Upvotes: 2