Seeking help in setting a reverse web sockets proxy

Pranav Lal pranav.lal at
Fri May 8 13:13:35 UTC 2020

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.
The server is running on my local ubuntu 19.10 box.

  server {
    listen 22000;

    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




More information about the nginx mailing list