【问题标题】:Trying to install jitsi meet with apache2尝试安装 jitsi meet with apache2
【发布时间】:2017-03-08 23:39:06
【问题描述】:

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

服务器: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 以连接到 韵律。

有关详细信息,请参阅韵律。设置 BOSH"

但是当我查看 /etc/prosody/conf.avail/meet.mydomain.xx.cfg.lua 文件时,我注意到 bosh 已经启用,其余配置正常,这里解释的是 @ 987654322@ 该日志不包含任何错误。 如果您有解决此问题的想法,我很感兴趣。

我测试的第二个配置:

<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 按钮时,什么也没有发生。 日志没有错误。

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

再见,感谢阅读

格波胡

【问题讨论】:

  • 这不是错误,它只是表示 BOSH 工作正常。问题是您代理了所有向 bosh 询问根“/”的请求。您应该尝试 ProxyPass /http-bind meet.mydomain.xx:5280/http-bind 仅代理询问 BOSH 的请求。

标签: jitsi


【解决方案1】:

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

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

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

apache 配置:

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 的变化

注意:某些值仅设置为域,其他值设置为域+端口 此处的错误配置可能会导致浏览器中出现 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',
 ....

【讨论】:

    猜你喜欢
    • 2017-01-03
    • 2020-10-07
    • 2021-05-23
    • 2022-07-11
    • 2021-07-27
    • 1970-01-01
    • 1970-01-01
    • 2021-08-07
    • 2020-08-06
    相关资源
    最近更新 更多