docker-exec-web-console
docker-exec-web-console copied to clipboard
console behind nginx proxy over https stops working
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
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.