Seeking help in setting a reverse web sockets proxy

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Seeking help in setting a reverse web sockets proxy

Pranav Lal
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
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx