KasmVNC icon indicating copy to clipboard operation
KasmVNC copied to clipboard

1.12.0 image doesn't work with Nginx as reverse proxy

Open liwei0705 opened this issue 1 year ago • 3 comments

Describe the bug Hi all I tested core-ubuntu-bionic image with nginx as a reverse proxy (my own domain SSL cert set in config) , and found that 1.10.0 worked fine but 1.12.0 did not.

Nginx configuration as below

server {
  listen 80;
  server_name  mydomain.com;
  rewrite ^(.*)$ https://$host$1 permanent;
}
server {
      listen   443 ssl;
      server_name mydomain.com;
      ssl_certificate  /data/web/ssl/mydomain.pem;
      ssl_certificate_key /data/web/ssl/mydomain.key;
      ssl_session_cache    shared:SSL:1m;
      ssl_session_timeout  5m;
      ssl_protocols TLSv1.2;
      ssl_prefer_server_ciphers on;
  ...
  
  location / {
    proxy_pass   https://127.0.0.1:6901;
    proxy_set_header Host $host;
    proxy_set_header X-Real_IP $remote_addr;
    proxy_set_header X-Forwarded-For $remote_addr:$remote_port;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";
    proxy_redirect off;
  }
  ...

If started a 1.10.0 container as below , and accessed "https://mydomain.com" , it worked all fine at chrome.

docker run --rm -it --shm-size=512m -d -p 6901:6901 -e VNC_PW=password kasmweb/core-ubuntu-bionic:1.10.0-rolling

But when 1.12.0 container running, access "https://mydomain.com" in chrome browser didn't connect to the ubuntu desktop automatically and no [connetct] button shown like 1.10.0 web page.

docker run --rm -it --shm-size=512m -d -p 6901:6901 -e VNC_PW=password kasmweb/core-ubuntu-bionic:1.12.0-rolling

BTW, Direct access by "https://mydomain.com:6901" worked fine with SSL warning.

liwei0705 avatar Apr 02 '23 03:04 liwei0705