Welcome! Log In Create A New Profile

Advanced

Seeking help in setting a reverse web sockets proxy

Pranav Lal
May 08, 2020 09:14AM
Hi all,

I am building a chatbot using python's remi GUI library. This serves
controls in the form of HTML which can then be opened in a browser. I want
to use nginx as a reverse proxy to serve this application.

I have tried to configure the virtual host without success. I am not getting
any errors in error.log but my bot is not returning any answers. If I run
the bot without proxying, it works.
The nginx configuration file is valid and the first page of the app is
served without any problems.

See below for the configuration file.
Note:
The server is running on my local ubuntu 19.10 box.

server {
listen 22000;
server_name ws.cisobot.com;

location / {
proxy_pass http://ws-backend;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;



proxy_http_version 1.1;
#proxy_set_header Upgrade $http_upgrade;
proxy_set_header Upgrade "websocket";
proxy_set_header Connection "upgrade";
}
}

upstream ws-backend {
# enable sticky session based on IP
ip_hash;

server 127.0.0.1:21000;


}

p


_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Seeking help in setting a reverse web sockets proxy

Pranav Lal May 08, 2020 09:14AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 75
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready