This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
vps:vps4th2nd_10 [2019/05/30 21:58] hoge@hoge [xdm] |
vps:vps4th2nd_10 [2019/10/20 23:30] (current) hoge@hoge [apache 設定] |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== ブラウザでの desktop 接続 ====== | ====== ブラウザでの desktop 接続 ====== | ||
| - | prisoner desktop にブラウザで接続する。 | + | prisoner desktop にブラウザで接続する。\\ |
| + | {{:vps:novnc.png}} | ||
| ===== desktop 設定 ===== | ===== desktop 設定 ===== | ||
| ==== pkg ==== | ==== pkg ==== | ||
| Line 7: | Line 7: | ||
| * xdm | * xdm | ||
| * xsm | * xsm | ||
| - | |||
| ==== xdm ==== | ==== xdm ==== | ||
| prisner desktop 起動時に xdm を起動する。 | prisner desktop 起動時に xdm を起動する。 | ||
| Line 38: | Line 37: | ||
| * #any host can get a login window | * #any host can get a login window | ||
| </code> | </code> | ||
| + | * /usr/local/etc/X11/xdm/xdm-config 編集<code> | ||
| + | !DisplayManager.requestPort: 0 | ||
| + | </code> | ||
| Line 75: | Line 76: | ||
| </code> | </code> | ||
| * /usr/local/libexec/novnc/utils/websockify/run 修正<code> | * /usr/local/libexec/novnc/utils/websockify/run 修正<code> | ||
| - | #!/usr/bin/env python3.6 (python を python3.6 に修正) | + | python3.6 -m websockify $@ (python を python3.6 に修正) |
| </code> | </code> | ||
| - | ==== novnc 設定 ==== | + | ==== noVNC 設定 ==== |
| - | novnc 向け設定を行う。 | + | noVNC 向け設定を行う。 |
| * /usr/local/etc/rc.d/novnc を作成する。<code> | * /usr/local/etc/rc.d/novnc を作成する。<code> | ||
| #!/bin/sh | #!/bin/sh | ||
| - | # | ||
| # PROVIDE: novnc | # PROVIDE: novnc | ||
| Line 90: | Line 90: | ||
| name="novnc" | name="novnc" | ||
| - | rcvar="novnc_enable" | + | rcvar="${name}_enable" |
| - | command="/usr/local/libexec/novnc/utils/websockify/run" | + | |
| - | command_args=${novnc_options} | + | |
| start_cmd="novnc_start" | start_cmd="novnc_start" | ||
| novnc_start() | novnc_start() | ||
| { | { | ||
| - | ${command} ${command_args} | + | echo "Start run" |
| + | echo ${command_args} | ||
| + | /usr/local/libexec/novnc/utils/websockify/run --daemon ${novnc_local} ${novnc_remote} | ||
| } | } | ||
| Line 107: | Line 106: | ||
| * /etc/rc.conf を編集する。<code> | * /etc/rc.conf を編集する。<code> | ||
| novnc_enable="YES" | novnc_enable="YES" | ||
| - | novnc_options="--daemon 6080 192.168.100.2:5901" | + | novnc_local="6080" |
| + | novnc_remote="192.168.100.2:5901" | ||
| </code> | </code> | ||
| Line 117: | Line 117: | ||
| </code> | </code> | ||
| * /usr/local/etc/apache24/extra/httpd-ssl.conf 設定<code> | * /usr/local/etc/apache24/extra/httpd-ssl.conf 設定<code> | ||
| + | SSLCACertificateFile "/usr/local/etc/apache24/ssl.crt/cacert.pem" | ||
| + | |||
| ProxyRequests Off | ProxyRequests Off | ||
| ProxyPass /websockify ws://localhost:6080/websockify retry=3 | ProxyPass /websockify ws://localhost:6080/websockify retry=3 | ||
| Line 128: | Line 130: | ||
| Require all granted | Require all granted | ||
| </Directory> | </Directory> | ||
| + | <Location /websockify/> | ||
| + | SSLVerifyClient require | ||
| + | </Location> | ||
| </code> | </code> | ||
| * /websockify へは reverse proxy 設定 | * /websockify へは reverse proxy 設定 | ||
| * /usr/local/libexec/novnc へは alias 設定 | * /usr/local/libexec/novnc へは alias 設定 | ||
| * <パス> は推測しにくいものにしたほうが良い? | * <パス> は推測しにくいものにしたほうが良い? | ||
| + | * クライアント証明書で保護 | ||
| + | ==== 接続 ==== | ||
| + | * Aliasで指定したパス+ vnc.html で接続する。 | ||