0

I am trying to make jitsi-meet working on apache server by the suburl "/meet" but i only get the index.html view without possibility to load a room.

First i proceeded a package install, stopping nginx and configuring apache virtualhost with parameters the following parameters :

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>

I have found this configuration here, the github of Jitsi-meet. I modified it to redirect all request on the localhost to avoid DNS resolution. Unfortunately it didn't work so after a lot of test, i uninstalled all packages to try a manual install, but the result is the same.

I installed jitsi-videobridge and jicofo. Jicofo is not launched automatically but i managed to make it work for my tests. I have renowned "jitsi-meet" directory sources for "meet" and put it on my apache DocumentRoot directory.

As Jitsi-meet is developped in NodeJS, I thought i could launch it directly as a http server on another port but i got this error :

/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 meet application can't be launched as a independent server...

My last solution would be running nginx on another port (with the proper default configuration for jitsi) and making a proxy on apache for enable jitsi on port 443. But nginx doesn't have much more features than apache so I think apache is able to make jitsi-meet work without nginx, don't you think the same ? Maybe a module for apache is missing ?

I am running a Debian Jessie server with apache 2.4.10, NodeJS 0.12 is installed and the firewall is disable (this is a test server). I enabled headers, proxy-http, ssl and rewrite modules.

I am stuck for now, i need help to make it work.

Thanks

Waren
  • 1
  • 1
  • 2

3 Answers3

3

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:

  • 80 TCP
  • 443 TCP
  • 10000 UDP

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

paxa
  • 31
  • 2
  • Got it running! Thanks! But.. how to login?? Also, folks deploying on web, pls see https://www.digitalocean.com/community/tutorials/how-to-install-jitsi-meet-on-ubuntu-18-04 – Nikhil VJ Apr 23 '20 at 05:10
  • had forgotten to add the "RewriteEngine".. lines in the apache2 conf. It's working! Thanks! <3 – Nikhil VJ Apr 23 '20 at 06:30
1

I managed to get it to work with the following modifications, assuming you have already an Apache server running, with the root /var/www and you want to add a Jitsi videobridge.

I installed Jitsi via apt-get like described on the official homepage to set up the server

I added the following to my Apache configuration/virtual host, assuming to have Jitsi available under www.example.com/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>

Furthermore, you will need to add a line to your Jitsi config.js to reach the meetingrooms:

getroomnode: function (path) { return location.pathname.replace('/jitsi/',''); },

In the file I also added the subdomain to the "domain" and the "muc".

Since the Jitsi html pages work with SSI, the paths there needs to be adapted. First the base.html which sets the base for all the references in the HTML:

<base href="/jitsi/" />

Furthermore in the index.html file, look for the #include virtual="/*.js" sections. For the JavaScript files, there is the root given, remove the / in front of them.

Hubrrr
  • 11
  • 1
0

I found an apache conf that's work :

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>
Seuf
  • 1
  • 2