Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

console behind nginx proxy over https stops working #4

Open
mohankchandrashekar opened this issue Sep 30, 2020 · 1 comment
Open

console behind nginx proxy over https stops working #4

mohankchandrashekar opened this issue Sep 30, 2020 · 1 comment

Comments

@mohankchandrashekar
Copy link

Hi,

trying to leverage this tool to expose docker shell via https link for users to connect remotely. the setup works without any issue behind nginx over tcp port 80. however, when put behind SSL port 443, the screen goes blank.

Nginx config:

location /webconsole1/ { 

  #proxy_redirect off;
  proxy_read_timeout 10800;
  proxy_connect_timeout 10800;
      proxy_send_timeout 10800;
      send_timeout 10800;

  proxy_set_header Host $http_host;
  proxy_set_header X-Real-IP $remote_addr;
  proxy_set_header X-Real-PORT $remote_port;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  #proxy_set_header X-NginX-Proxy true;
  proxy_buffering off;
  client_max_body_size 0;

  proxy_http_version 1.1;
  proxy_set_header Upgrade $http_upgrade;
  proxy_set_header Connection "upgrade";

  proxy_pass http://example.com:9999/webconsole1/;
      }

access log records http 200:

10.x.x.x - - [30/Sep/2020:18:20:42 -0400] "GET /webconsole1/?cid=user001-DG21 HTTP/2.0" 200 2073 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Safari/605.1.15" "-"

Appreciate help on this.

thanks,
Mohan

@mohankchandrashekar
Copy link
Author

I think found the solution after reading websocket over ssl. Changed the line:

websocket = new WebSocket("ws://"

to

websocket = new WebSocket("wss://"

in index.html and the solution works as designed.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant