Enable path based NoVNC
See original GitHub issueAuthor Name: EOLE Team (EOLE Team) Original Redmine Issue: 3538, https://dev.opennebula.org/issues/3538 Original Date: 2015-01-30
Hello,
Actually we have the @websocketproxy.py@ listening on the port @29876@ and the NoVNC client open a WebSocket directly on that port.
I would like the client to only use the port @443@ as I already have a nginx reverse proxy.
I setup a nginx location pointing to @websocketproxy.py@:
1. /etc/nginx/sites-available/opennebula-sunstone
1. Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
##
upstream sunstone {
server 127.0.0.1:9869;
}
upstream websocketproxy {
server 127.0.0.1:29876;
}
1. Port 80 redirected to SSL
server {
listen 80;
server_name nebula.example.net;
location / {
return 301 https://$host;
}
}
server {
listen 443 default_server;
listen [::]:443 default_server ipv6only=on;
ssl on;
ssl_certificate /etc/nginx/ssl/server.crt;
ssl_certificate_key /etc/nginx/ssl/server.key;
root /usr/share/nginx/html;
index index.html index.htm;
server_name nebula.example.net;
access_log /var/log/nginx/opennebula-sunstone-access.log;
error_log /var/log/nginx/opennebula-sunstone-error.log;
# To upload ISO files, increase for VMs images
client_max_body_size 1G;
location / {
include proxy_params;
proxy_pass http://sunstone;
}
location /websockify {
proxy_pass http://websocketproxy;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
In NoVNC:
- if the port is not set(1), it use the same as the current connection
- the @path@ parameter(2) is used as the full path of the resource
For what I see, this would require:
- add a @vnc_proxy_path@ to customize the NoVNC @path@ parameter if wanted
- add a @vnc_proxy_listen@ to customize the @websocketproxy.py@ @source_addr@ with default to @0.0.0.0@
- add a flag to disable passing the @vnc_proxy_port@ as @port=@ parameter to NoVNC
Regards.
(1) source:src/sunstone/public/bower_components/no-vnc/vnc_auto.html#L168 (2) source:src/sunstone/public/bower_components/no-vnc/vnc_auto.html#L185
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (1 by maintainers)
Top Results From Across the Web
Embedding and Deploying noVNC Application
This document describes how to embed and deploy the noVNC application, which includes settings and a full user interface. If you are looking...
Read more >Websockify & noVNC behind an NGINX Proxy - datawookie
NGINX will proxy requests based on the path /novnc/ . The path parameter tells noVNC where to look for Websockify. The resize parameter...
Read more >Kali In The Browser (noVNC) | Kali Linux Documentation
Alternatively, you may have setup VNC which will allow for remote graphical access (please make sure to do this securely by having VNC...
Read more >Ubuntu 22.04 LTS : VNC Client : noVNC - Server World
[2]. Start VNC Server with a user, refer to here. This example is based on that [ubuntu] user runs VNC server with [5901]...
Read more >Configure remote console access - OpenStack Zed
Consider a noVNC-based VNC console connection for example: ... In this way, the VNC proxy works as a bridge between the public network...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This functionality will be present in 5.6 release.
Thanks @le-garff-yoann for your work.
Everybody wants to proxy Sunstone with VNCproxy on a single port I think. +1 for this (please Rubensito don’t pospone again ;-P )