问题描述
我正在尝试在Nginx服务器上托管聊天应用程序,但出现错误。我在ubuntu服务器上运行,并且在客户端显示400错误的错误请求。
*71 connect() Failed (111: Connection refused) while connecting to upstream,client: 193.36.225.4,server: xxx.xxx.xxx.xxx,request: "GET /socket.io/?EIO=3&transport=polling&t=NGV-jAk HTTP/1.1",upstream: "http://127.0.0.1:5001/socket.io/?EIO=3&transport=polling&t=NGV-jAk",host: "xxx.xxx.xxx.xxx",referrer: "http://xxx.xxx.xxx.xxx/"
NGIX文件:
upstream socketio_nodes {
ip_hash;
#server http://unix:/home/web_chatbot/web_chatbot.sock/socket.io:/socket.io/;
server 127.0.0.1:5000;
server 127.0.0.1:5001;
server 127.0.0.1:5002;
# to scale the app,just add more nodes here!
}
server {
listen 80;
server_name 000.000.000.000;
location / {
include proxy_params;
proxy_pass http://127.0.0.1:5000;
}
location /static {
alias /home/web_chatbot/web_chatbot/static;
expires 30d;
}
location /socket.io {
include proxy_params;
proxy_http_version 1.1;
proxy_buffering off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_pass http://socketio_nodes/socket.io;
}
}
点子要求:fask,fask_socketio,gunicorn,eventlet
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)