我正试图通过suburl "/meet"使jitsi-meet在apache服务器上工作,但我只得到index.html视图,而不可能加载房间。
首先,我进行软件包安装,停止nginx并配置apache virtualhost,参数如下:
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/meet/[a-zA-Z0-9]+$
RewriteRule ^/meet/(.*)$ /meet/ [PT]
ProxyPreserveHost Off
<Location "/meet/http-bind">
RequestHeader set Host "mydomain.com"
ProxyPass http://localhost:5280/http-bind
ProxyPassReverse http://localhost:5280/http-bind
</Location>
<Location "/meet/xmpp-websocket">
ProxyPass http://localhost:5280
ProxyPassReverse http://localhost:5280
</Location>
我在Jitsi-meet的github中找到了这个配置。我将其修改为重定向本地主机上的所有请求,以避免DNS解析。不幸的是,它没有工作,所以经过大量的测试,我卸载了所有的包来尝试手动安装,但结果是一样的。
我安装了jitsi-videobridge和jicofo。Jicofo不是自动启动的,但我设法使它在我的测试中工作。我为"meet"创建了著名的"jitsi-meet"目录源,并将其放在apache DocumentRoot目录下。
由于Jitsi-meet是在NodeJS中开发的,我想我可以在另一个端口上直接启动它作为http服务器,但我得到了这个错误:
/my_path/meet/app.js:63
$(document).ready(function () {
ReferenceError: document is not defined
at Object.<anonymous> (/my_path/meet/app.js:63:3)
at Module._compile (module.js:456:26)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:906:3
Jitsi满足应用程序不能作为独立服务器启动…
我的最后一个解决方案是在另一个端口上运行nginx(使用正确的jitsi默认配置),并在apache上创建一个代理,以便在端口443上启用jitsi。但是nginx并没有比apache更多的功能,所以我认为apache没有nginx也能让jitsi-meet工作,你不这么认为吗?也许apache缺少一个模块?
我正在运行一个Debian Jessie服务器与apache 2.4.10, NodeJS 0.12安装和防火墙是禁用的(这是一个测试服务器)。我启用了headers, proxy-http, ssl和rewrite模块。
我现在卡住了,我需要帮助使它工作。
谢谢
在本地网络安装Apache的子目录下安装Jitsi (ubuntu 18.04)
假设1)DocumentRoot是/var/www/html 2)安装Jitsi到/var/www/html/meet 3)服务器的本地ip地址是192.168.2.24
1。使用Basic jitsi安装jitsi满足Install (https://github.com/jitsi/jitsi-meet/blob/master/doc/quick-install.md)
从上面的how to
添加Jitsi包存储库
echo 'deb https://download.jitsi.org stable/' >> /etc/apt/sources.list.d/jitsi-stable.list
wget -qO - https://download.jitsi.org/jitsi-key.gpg.key | sudo apt-key add -
打开防火墙端口
在防火墙中打开以下端口,允许通信到运行jitsi的机器:
- TCP 80 TCP 443 10000 UDP
Install Jitsi Meet
注意:安装程序将检查是否存在Nginx或Apache(按此顺序),并在它找到的web服务器中配置一个虚拟主机来服务Jitsi Meet。如果上面都没有找到,那么默认为Nginx。如果你已经在同一台机器上的443端口上运行Nginx, turnserver配置将被跳过,因为它将与你当前的443端口冲突。
# Ensure support is available for apt repositories served via HTTPS
apt-get install apt-transport-https
# Retrieve the latest package versions across all repositories
apt-get update
# Perform jitsi-meet installation
apt-get -y install jitsi-meet
在安装过程中,您将被要求输入Jitsi Meet实例的主机名。如果您已经在DNS中设置了实例的FQDN,请在此处输入。如果你没有一个可解析的主机名,你可以输入机器的IP地址(如果它是静态的或不改变的)。
此主机名(或IP地址)将用于Jitsi Meet内部的虚拟主机配置,并且您和您的通讯员将使用它来访问web会议。
"
1。当您要求输入Jitsi Meet实例的主机名时,请插入您希望Jitsi听到的ip。(例如192.168.2.24)
2。创建jjitsi -meet目录的符号链接
sudo ln -s /usr/share/jitsi-meet /var/www/html/meet
如果你的DocumentRoot不同于/var/www/html,则创建到你的DocumentRoot的符号链接
3。在/usr/share/jitsi-meet(安装目录)
3 a。在file base.html change
<base href="/" /> to <base href="/meet/" />
3 b。在file index.html change
#include virtual="/config.js" to #include virtual="config.js"
#include virtual="/interface_config.js" to #include virtual="interface_config.js"
#include virtual="/logging_config.js" to #include virtual="logging_config.js"
( remove the / in front of them )
4。在/etc/jitsi/meet文件中修改
bosh: '//192.168.2.24/http-bind', to bosh: '//192.168.2.24/meet/http-bind',
文件看起来像
/* eslint-disable no-unused-vars, no-var */
var config = {
// Connection
//
hosts: {
// XMPP domain.
domain: '192.168.2.24',
// When using authentication, domain for guest users.
//anonymousdomain: 'guest.192.168.2.24',
// Domain for authenticated users. Defaults to <domain>.
// authdomain: '192.168.2.24',
// Jirecon recording component domain.
// jirecon: 'jirecon.192.168.2.24',
// Call control component (Jigasi).
// call_control: 'callcontrol.192.168.2.24',
// Focus component domain. Defaults to focus.<domain>.
// focus: 'focus.192.168.2.24',
// XMPP MUC domain. FIXME: use XEP-0030 to discover it.
muc: 'conference.192.168.2.24'
},
// BOSH URL. FIXME: use XEP-0156 to discover it.
bosh: '//192.168.2.24/meet/http-bind',
// Websocket URL
// websocket: 'wss://192.168.2.24/xmpp-websocket',
...
5。在/etc/apache2/sites-available中,将yourrip .conf修改如下
此配置将把所有流量从端口80(http)重定向到端口443(https)
修改所有必要的部分以适应您的配置(ip,subdir,DocumentRoot)
<VirtualHost *:80>
ServerName 192.168.2.24
Redirect permanent / https://192.168.2.24/
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</VirtualHost>
<VirtualHost *:443>
ServerName 192.168.2.24
SSLProtocol TLSv1 TLSv1.1 TLSv1.2
SSLEngine on
SSLProxyEngine on
SSLCertificateFile /etc/jitsi/meet/192.168.2.24.crt
SSLCertificateKeyFile /etc/jitsi/meet/192.168.2.24.key
SSLCipherSuite
"EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA+SHA256:EECDH+aRSA+SHA256:EECDH+ECDSA+SHA384:EECDH+ECDSA+SHA256:EECDH+aRSA+SHA384:EDH+aRSA+AESGCM:EDH+aRSA+SHA256:EDH+aRSA:EECDH:!aNULL:!eNULL:!MEDIUM:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:!RC4:!SEED"
SSLHonorCipherOrder on
Header set Strict-Transport-Security "max-age=31536000"
DocumentRoot "/var/www/html"
<Directory "/var/www/html/meet">
Options Indexes MultiViews Includes FollowSymLinks
AddOutputFilter Includes html
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ErrorDocument 404 /static/404.html
Alias "/meet/config.js" "/etc/jitsi/meet/192.168.2.24-config.js"
<Location /meet/config.js>
Require all granted
</Location>
Alias "/meet/external_api.js" "/usr/share/jitsi-meet/libs/external_api.min.js"
<Location /meet/external_api.js>
Require all granted
</Location>
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/meet/[a-zA-Z0-9]+$
RewriteRule ^/meet/(.*)$ /meet/ [PT]
ProxyPreserveHost on
ProxyPass /meet/http-bind http://localhost:5280/http-bind/
ProxyPassReverse /meet/http-bind http://localhost:5280/http-bind/
</VirtualHost>
6。提示
。如果您已经安装了Webmin,请将Webmin的端口从10000更改为您喜欢的任何端口
b.如果3个或更多参与者有问题,请查看步骤1
我设法让它工作与以下修改,假设你已经有一个Apache服务器运行,与根目录/var/www,你想添加一个Jitsi视频桥。
我按照官方主页上的描述通过apt-get安装Jitsi来设置服务器
我在Apache配置/虚拟主机中添加了以下内容,假设在www.example.com/jitsi
下有Jitsi可用Alias "/jitsi/config.js" "/etc/jitsi/meet/example.com-config.js"
<Location "/jitsi/config.js">
Require all granted
</Location>
Alias "/jitsi/external_api.js" "/usr/share/jitsi-meet/libs/external_api.min.js"
<Location "/jitsi/external_api.js">
Require all granted
</Location>
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/jitsi/[a-zA-Z0-9]+$
RewriteRule ^/jitsi/(.*)$ /jitsi/ [PT]
ProxyPreserveHost on
ProxyPass /http-bind http://localhost:5280/http-bind/
ProxyPassReverse /http-bind http://localhost:5280/http-bind/
Alias "/jitsi" "/usr/share/jitsi-meet"
<Location "/jitsi">
Options Indexes Includes MultiViews FollowSymLinks
AddOutputFilter Includes .html
AllowOverride All
Order allow,deny
Allow from all
</Location>
此外,您需要在Jitsi config.js
中添加一条线路以到达会议室:
getroomnode: function (path) { return location.pathname.replace('/jitsi/',''); },
在文件中,我还将子域添加到"domain"one_answers"muc"中。
由于Jitsi html页面使用SSI,因此需要调整其中的路径。首先是base.html
,它设置了HTML中所有引用的基础:
<base href="/jitsi/" />
此外,在index.html
文件中,查找#include virtual="/*.js"部分。对于JavaScript文件,有给定的根,删除它们前面的/。
我找到了一个apache配置文件:
NameVirtualHost 127.0.0.1:80
<VirtualHost 127.0.0.1:80>
DocumentRoot "/Users/lyubomir/Sites/jitmeet"
ServerName jitmeet.lyubomiinovsair
<Directory "/Users/lyubomir/Sites/jitmeet/">
Options Indexes MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ProxyPass /http-bind http://127.0.0.1:7070/http-bind/
ProxyPassReverse /http-bind http://127.0.0.1:7070/http-bind/
RewriteEngine on
RewriteRule ^/([a-zA-Z0-9]+)$ /index.html
</VirtualHost>