Sergi
(Sergi)
November 29, 2016, 5:39pm
1
Hi,
I have a problem with a proxy pass and opennebula.
I have a proxp pass that lets pass the requests to opennebula. If I try to connect to the URL that I present through the proxy,
I can login, boot and stop VMs. The problem I have when I want to open a console, I have the error 1006.
If I connect directly to opennebula, I can open vnc console without any problem.
Has anyone configured a proxy pass with opennebula?
Anyone have any idea?
Thanks.
jfontan
(Javi Fontán)
November 30, 2016, 11:31am
2
VNC console uses another port for websockets (29876). That may be your problem. I’ve never proxied that VNC -> websockets proxy successfully myself.
Here’s what some users are doing:
https://forum.opennebula.io/t/vnc-with-sunstone-behind-nginx-proxy?source_topic_id=3380
This works for me:
server {
listen *:443;
server_name my.domain.tld;
error_log /var/log/nginx/my.domain.tld.access.log;
ssl on;
ssl_certificate /etc/letsencrypt/live/my.domain.tld/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/my.domain.tld/privkey.pem;
#ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # don’t use SSLv3 ref: POODLE
location / {
#auth_basic "closed site";
#auth_basic_user_file htpasswd;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forward-Proto http;
proxy_set_header X-Nginx-Proxy true;
proxy_redirect off;
proxy_pass http://127.0.0.1:9869;
}
}
jamdev12
(Jesus Malena)
November 30, 2016, 4:47pm
4
In case non secure works for you this is my NginX config:
server {
listen 80;
server_name _;
access_log /var/log/nginx/access.log main;
location / {
proxy_pass http://127.0.0.1:9869/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 100M;
}
}