Docker 容器中的 Jitsi Meet:Websocket 错误

Docker 容器中的 Jitsi Meet:Websocket 错误

(我问过这个问题堆栈溢出昨天,但我还没有收到答复,也许 Serverfault 是解决这个问题的更好的平台。另外,我不能在这里发布图片,但我希望即使没有图片,问题也能清楚。如果不是,请查看 SO 帖子。)

我想通过 Docker 容器在我的 Debian 服务器上设置 Jitsi Meet 实例。我有一个 Apache Web 服务器正在运行,我想在子域上添加 Jitsi 服务器。

我关注了教程关于如何执行此操作,我能够访问该网站,但不能加入会话。

我猜测 Apache 配置中存在一些错误(见下文),但我真的不知道。

JS 控制台中有一些错误,但重要的错误(我猜)是:

WebSocket 与 'wss://jitsi.example.com/xmpp-websocket?room=strangeshopsincorporateagain' 的连接失败:WebSocket 握手期间出错:缺少“升级”标头

Jitsi 配置文件(重要部分;我没有改变任何其他内容):

...
#
# Basic configuration options
#

# Directory where all configuration will be stored
CONFIG=~/.jitsi-meet-cfg

# Exposed HTTP port
HTTP_PORT=8000

# Exposed HTTPS port
HTTPS_PORT=8443

# System time zone
TZ=Europe/Berlin

# Public URL for the web service (required)
PUBLIC_URL=https://jitsi.example.com

# IP address of the Docker host
# See the "Running behind NAT or on a LAN environment" section in the Handbook:
# https://jitsi.github.io/handbook/docs/devops-guide/devops-guide-docker#running-behind-nat-or-on-a-lan-environment
DOCKER_HOST_ADDRESS=192.168.178.57
# local IP address of my server
...

Apache 配置:

<VirtualHost *:443>
        ServerName jitsi.example.com:443

        SSLEngine on
        SSLCertificateFile /etc/letsencrypt/live/example.com/fullchain.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem

        AllowEncodedSlashes NoDecode

        SSLProxyEngine On
        SSLProxyVerify None
        SSLProxyCheckPeerCN Off
        SSLProxyCheckPeerName Off

        RewriteEngine on
        RewriteCond ${HTTP:UPGRADE} ^WebSocket$ [NC]
        RewriteCond ${HTTP:CONNECTION} ^Upgrade$ [NC]
        RewriteRule .* "wss://localhost:8443/$1" [P,L]

        ProxyPreserveHost On

        ProxyPass / https://localhost:8443/ nocanon
        ProxyPassReverse / https://localhost:8443/

        ProxyPass /xmpp-websocket wss://localhost:8443/xmpp-websocket
        ProxyPassReverse /xmpp-websocket wss://localhost:8443/xmpp-websocket

        ProxyRequests off
</VirtualHost>

输出apache2ctl -S

VirtualHost configuration:
*:80                   example.com (/etc/apache2/sites-enabled/example.conf:1)
*:443                  is a NameVirtualHost
         default server jitsi.example.com (/etc/apache2/sites-enabled/jitsi.conf:1)
         port 443 namevhost jitsi.example.com (/etc/apache2/sites-enabled/jitsi.conf:1)
         port 443 namevhost example.com (/etc/apache2/sites-enabled/example.conf:39)
         port 443 namevhost office.example.com (/etc/apache2/sites-enabled/office-code.conf:1)
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex rewrite-map: using_defaults
Mutex ssl-stapling-refresh: using_defaults
Mutex ssl-stapling: using_defaults
Mutex proxy: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/var/run/apache2/" mechanism=default
Mutex mpm-accept: using_defaults
Mutex watchdog-callback: using_defaults
PidFile: "/var/run/apache2/apache2.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="www-data" id=33
Group: name="www-data" id=33

相关内容