Install Jitsi in subdir of Apache in local network (ubuntu 18.04)
Assuming that 1)the DocumentRoot is /var/www/html 2) install Jitsi at /var/www/html/meet and 3)the local ip address of server is 192.168.2.24
1. Install jitsi with Basic Jitsi Meet install (https://github.com/jitsi/jitsi-meet/blob/master/doc/quick-install.md)
from the above how to "
Add the Jitsi package repository
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 -
Open ports in your firewall
Open the following ports in your firewall, to allow traffic to the machine running jitsi:
Install Jitsi Meet
Note: The installer will check if Nginx or Apache is present (in that order) and configure a virtualhost within the web server it finds to serve Jitsi Meet. If none of the above is found it then defaults to Nginx. If you are already running Nginx on port 443 on the same machine turnserver configuration will be skipped as it will conflict with your current port 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
During the installation, you will be asked to enter the hostname of the Jitsi Meet instance. If you have a FQDN for the instance already set up in DNS, enter it there. If you don't have a resolvable hostname, you can enter the IP address of the machine (if it is static or doesn't change).
This hostname (or IP address) will be used for virtualhost configuration inside the Jitsi Meet and also, you and your correspondents will be using it to access the web conferences.
"
1a. When you asked to enter the hostname of the Jitsi Meet instance insert the ip that you want jitsi to hear.
(in example 192.168.2.24)
2. Make symbolic link to jitsi-meet directory.
sudo ln -s /usr/share/jitsi-meet /var/www/html/meet
if your DocumentRoot is different from /var/www/html make the symbolic link to your DocumentRoot
3.At the /usr/share/jitsi-meet (installation directory)
3a. in file base.html change
<base href="/" /> to <base href="/meet/" />
3b. in 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. At /etc/jitsi/meet in file yourip-config.js change
bosh: '//192.168.2.24/http-bind', to bosh: '//192.168.2.24/meet/http-bind',
The file look like
/* 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. At /etc/apache2/sites-available change the yourip.conf to look like the following
this configuration will redirect all the traffic from port 80(http) to port 443(https)
Change all necessary parts to fit your configuration(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.Tips
a.If you have Webmnin installed change the port of Webmin from 10000 to anything you like
b.if you have problems with 3 and more participants take a look at the Advanced configuration section of the link of step 1