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

proxifying this via nginx... #4

Open
plato79 opened this issue Apr 7, 2021 · 1 comment
Open

proxifying this via nginx... #4

plato79 opened this issue Apr 7, 2021 · 1 comment

Comments

@plato79
Copy link

plato79 commented Apr 7, 2021

Is there a way to proxify this via nginx web server. I have several servers configured under nginx, and if possible I want to proxify this also..

It's working if I connect directly via IP but,

just forwarding to http://ip:8081/vnc.html didn't work..

  server {
    listen 443 ssl;
    server_name vnc.local.domain;
    include ssl-params.conf;
    location / {
      proxy_pass http://192.168.1.23:8081/vnc.html;
      proxy_http_version 1.1;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection "upgrade";
      proxy_read_timeout 43200000;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header Host $http_host;
      proxy_set_header X-NginX-Proxy true;
    }

  }
@doug-w
Copy link
Owner

doug-w commented May 3, 2021

I've used this:

    location /mac/ {
            rewrite  ^/mac/$  /mac/vnc.html?autoconnect=true&host=www.fqdn.com/mac/&port=443  permanent;
            proxy_pass http://mac-vnc:8081/;
            proxy_read_timeout 604800s;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
    }

That was for a location proxy rather than subdomain, but the key part was having the rewrite to the place vnc expected.

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

2 participants