1

我知道已经有关于这个主题的帖子,但是它们没有产生好的结果,我想在这里分享我对这个主题的想法。如果您认为这是一个坏主意,请随时审核我的帖子。

服务器:Ubuntu 16.04.1、Apache2.4.18

DNS配置:

  • 对于 Jitsi meet - meet.mydomain.xx ----> ip_of_my_server
  • 对于我的网站 - mydomain.xx ----> ip_of_my_server

就像我说的,我尝试在 apache2 上运行 Jitsi meet。按照快速安装中描述的步骤(https://github.com/jitsi/jitsi-meet/blob/master/doc/quick-install.md

如果我在安装 Ubuntu 之后在我的服务器上安装 Jitsi meet,那么没有 Apache 或 Nginx。Jitsi 效果很好。如果我在安装 Nginx 后在我的服务器上安装 Jitsi meet。Jitsi 效果很好。

同样的安装方法,我在安装Apache2后尝试安装Jitsi meet,所以注意到Jitsi meet并没有自己配置apache2,所以我尝试了第一个配置:

<VirtualHost *:443>
ServerAdmin postmaster@mydomain.xx
ServerName  meet.mydomain.xx
ServerAlias  meet.mydomain.xx
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
DocumentRoot "/usr/share/jitsi-meet/"
<Directory /usr/share/jitsi-meet/>
AllowOverride All
</Directory>

ProxyPass / http://meet.mydomain.xx:5280/http-bind
ProxyPassReverse / http://meet.mydomain.xx:5280/http-bind

ProxyPreserveHost Off

<Location "/http-bind">
   Order allow,deny
   Allow from all
</Location>

<Location "/meet/xmpp-websocket">
    ProxyPass http://meet.mydomain.xx:5280
    ProxyPassReverse http://meet.mydomain.xx:5280
</Location>

ErrorLog /var/www/meet/logs/error.log
CustomLog /var/www/meet/logs/access.log combined
SSLCertificateFile /etc/letsencrypt/live/acert.mydomain.xx/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/acert.mydomain.xx/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>

当我加载页面 meet.mydomain.xx 时,我收到以下错误:

“它有效!现在您的客户 BOSH 指向此 URL 以连接到 Prosody。

有关更多信息,请参阅韵律。设置 BOSH "

但是当我查看 /etc/prosody/conf.avail/meet.mydomain.xx.cfg.lua 文件时,我注意到 bosh 已启用,其余配置正常,此处解释为https:// github.com/jitsi/jitsi-meet/blob/master/doc/manual-install.md 日志不包含错误。如果您有解决此问题的想法,我很感兴趣。

我测试的第二个配置:

<VirtualHost *:80>
ServerAdmin postmaster@mydomain.xx
ServerName  meet.mydomain.xx
ServerAlias  meet.mydomain.xx
DocumentRoot "/usr/share/jitsi-meet/"

SSLProxyEngine On
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/[a-zA-Z0-9]+$
RewriteRule ^/(.*)$ / [PT]
RewriteRule ^/http-bind$ https://meet.mydomain.xx:5281/http-bind [P,L]

ErrorLog /var/www/meet/logs/error.log
CustomLog /var/www/meet/logs/access.log combined
</Virtualhost>

使用此设置,结果似乎更好,我可以看到 Jitsi meet 的主页,但没有文字,没有徽标,当我点击 go 按钮时,什么也没有发生。该日志不包含任何错误。

所以在这里我真的不知道该怎么做。如果有人有一些建议或想法,谢谢分享!

再见,感谢阅读

斯波胡

4

1 回答 1

1

这适用于 FreeBSD 12.2-RELEASE、apache24-2.4.46,尤其适用于 Android 手机上的 jitsi 客户端应用程序。我想它会回答你的问题。

作为我们网站上的额外调整:对于 https,我们使用非标准端口 444(而不是通常的 443)。

我遵循了http://www.bobeager.uk/pdf/jitsi.pdf的非常有用的说明 (谢谢!),但是,我使用 apache 而不是 nginx,这很简单,因为它无论如何都在这台服务器上运行。

阿帕奇配置:

loaded modules in httpd.conf
    LoadModule proxy_module libexec/apache24/mod_proxy.so
    LoadModule proxy_connect_module libexec/apache24/mod_proxy_connect.so
    LoadModule proxy_http_module libexec/apache24/mod_proxy_http.so
    

apache VirtualServer 配置:注意 RewriteRule 中的 /index.html!

<VirtualHost *:444>
ServerName meet.example.com:444
DocumentRoot "/usr/local/www/jitsi-meet"
ServerAdmin np@ibu.de
SSLEngine on
SSLProxyEngine on
SSLCertificateFile       "/usr/local/etc/letsencrypt/live/meet.example.com/fullchain.pem"
SSLCertificateKeyFile    "/usr/local/etc/letsencrypt/live/meet.example.com/privkey.pem"
  <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_URI} ^/[a-zA-Z0-9]+$
    RewriteRule ^/([a-zA-Z0-9=?]+)$ /index.html
  </IfModule>

<directory "/usr/local/www/jitsi-meet">
    require all granted
    Options +Includes
    directoryindex index.html
    AddOutputFilter Includes html
        XBitHack on
</directory>

# BOSH
<location "/http-bind">
        proxypass  "http://localhost:5280/http-bind"
        header set host "expr=%{HTTP_HOST}"
</location>

# XMPP websockets
<location "/xmpp-websocket">
        proxypass  "http://localhost:5280/xmpp-websocket"
        header set host  "expr=%{HTTP_HOST}"
        header set x-forwarded-for "expr=%{REMOTE_ADDR}"
</location>
</VirtualHost>

由于 XBitHack 我做了:

    chmod +x /usr/local/www/jitsi-meet/*.html

不确定,这是否有必要;但我认为,它不会受到伤害。

/usr/local/www/jitsi-meet/config.js 的变化

注意:某些值仅设置为 domain,其他值设置为 domain+port 此处的错误配置可能会导致浏览器中的 javascript CORS 错误。检查 firefox crtl-shift-I ,控制台

var domainroot = 'meet.example.com'
var domainuri = domainroot+':444'
var config = {
   hosts: {
        domain: domainroot,
        bridge: 'jitsi-videobridge.'+domainroot,
        focus: 'focus.'+domainroot,
        muc: 'conference.'+domainroot
   },

    // BOSH URL. FIXME: use XEP-0156 to discover it.
    // bosh: '//jitsi-meet.example.com/http-bind',
    bosh: '//'+domainuri+'/http-bind',
 ....
于 2020-12-28T14:22:42.543 回答