Websockify/ noVNC


noVNC实际上也是透过Websockify连线到VNC sever

image.png

以前他们两个是一起包在同一个GitHub repo下,後来分开维护了

但是安装noVNC时还是会自动去装Websockify

Insatll

如果要自行手动安装的话

apt-get install websockify

Usage

以前websockify和noVNC还没分家时的用法

websockify -D \
    --web /usr/share/novnc/ \
    6080 \
    localhost:5900

现在新版的noVNC会自己去call websockify

novnc --listen 6080 --vnc localhost:5901

Nginx Proxy

加上reverse proxy可以让我们直接call网址/ ip,而不用去指定6080 port

nginx.conf

user www-data;
daemon off;

events {
}

http {
  server {
    listen 80 default_server;
    
    location / {
      root /www/data;
      try_files $uri $uri/ /index.html;
    }
    
    location /novnc/ {
      proxy_pass http://127.0.0.1:6080/;
    }
    
    location /novnc/websockify {
      proxy_pass http://127.0.0.1:6080/;
      proxy_http_version 1.1;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection "Upgrade";
      proxy_set_header Host $host;
    }
  }
}

Reference

Websockify & noVNC behind an NGINX Proxy


<<:  LabVIEW步进马达控制(初阶)

>>:  CDN 与网站资讯安全服务简介

Day11-Database——效能的储备足够吗?-N+1 query

标题参考来源 大家好~ 今天来简单认识一下 N+1 query 吧! 什麽是 N+1 query 呢...

Day 18 中场休息,来做点酷东西(状态管理)

中场休息的第三天~继续接着做 在取到值之後,接着要做的就是把它渲染到专案清单上啦!上面做的事情跟中场...

laravel 8 (一) 建立专案及资料库设定

安装专案 composer global require laravel/installer //将...

Day19 React Context API

在典型的 React 应用程序中,数据通过 props 自上而下(父元件到子元件)传递,但是对於应用...