question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Enable path based NoVNC

See original GitHub issue

Author 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:

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:closed
  • Created 6 years ago
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
abelCoronado93commented, Jun 14, 2018

This functionality will be present in 5.6 release.

Thanks @le-garff-yoann for your work.

5reactions
penzoiderscommented, May 21, 2018

Everybody wants to proxy Sunstone with VNCproxy on a single port I think. +1 for this (please Rubensito don’t pospone again ;-P )

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found