Etherpad - Jitsi - Apache

I have installed a fresh copy of Jitsi on Ubuntu 18.04, Etherpad.

Etherpad can be accessed from

http://13.232.74.121:9001/

Jitsi can be accessed from

a) I have added this in (for port 80 and another for port 443) /etc/apache2/sites-available/crweb.sxcs.in.conf

# Etherpad-Lite
<Location /opt/etherpad/etherpad-lite/>
ProxyAddHeaders On
ProxyPass http://13.232.74.121:9001/

RequestHeader set X-Forwarded-For REMOTE_ADDR
RequestHeader set X-Forwarded-Host HOST

b) and this in /etc/jitsi/meet/crweb.sxcs.in-config.js

etherpad_base: ‘https://13.232.74.121/etherpad/p/’,

But once I have added this above line, I can’t open Jitsi. It’s showing a blank screen.

If I remove or comment this line, I can access Jitsi.

c) If I add this in /etc/jitsi/meet/crweb.sxcs.in-config.js

etherpad_base: ‘https://crweb.sxcs.in/etherpad/p/’,

I can open Jitsi, but can’t open Etherpad from Jitsi. If I click the tab, I go to a black screen with a clickable link “here” which redirect to my jitsimeet server.

d) If I add this in /etc/jitsi/meet/crweb.sxcs.in-config.js

etherpad_base: ‘http://crweb.sxcs.in/etherpad/p/’,

I can open Jitsi, but can’t open Etherpad from Jitsi. If I click the tab, I get a completely black screen.

Etherpad is installed in - /opt/etherpad/etherpad-lite

This the correct setting using your domain, the same domain to access the deployment.
I think your apache config is wrong and missing the alias for etherpad/p
Open https://meet.jit.si/etherpad/ this is what you need to see when opening https://crweb.sxcs.in/etherpad/.

What should be the correct syntax in apache config?

apache config attachedcrweb.sxcs.in.txt (2.0 KB)

You should do it the same way http-bind is done, not in a location tag

can you please show the syntax? what it should be for my domain?

where do i place it in apache conf?

As I said, just like this: https://github.com/jitsi/jitsi-meet/blob/master/doc/debian/jitsi-meet/jitsi-meet.example-apache#L45, you already have this in your config.
Sorry I’m not familiar with apache syntax, I can show it how matching is done in nginx, but I’m not sure about Apache.

can anyone provide with the correct apache syntax for my Jitsi installation so that I can integrate Etherpad?

Jitsi and Etherpad is running fine seperately. But I can’t integrate it with Jitsi.

@avirath_tech I integrated etherpad with jitsi meet in nginx (jitsi meet was running in https and etherpad was running fine in http 9001 port) and faced exactly same type of pb at first… but after restarting pc it worked fine… may be I did not reload/restart something perfectly as it should after making changes. you can give it a try or try restart/reload every components affected by your change.

i did it several times… restarted all components, stopped and started.

i just need the correct apache configuration for Etherpad

Also, I am installing it on a server. not local pc.

In your apache config, can you try using “http://localhost:9001/” instead of ‘http://13.232.74.121:9001/’ in etharpad lite portion? as if you followed the exact git instruction, you have it running in http://127.0.0.1:9001 ,then again restart etherpad first and then restart other components… It should work :face_with_thermometer:

For ngxing:

   location ~ ^/etherpad(/?)(.*)$ {
        proxy_pass https://etherpad.jitsi.example.com/etherpad/$2$is_args$args;
        proxy_set_header Host jitsi.example.com;
        proxy_redirect off;
        proxy_buffering off;
    }

For apache maybe it is:

ProxyPreserveHost On
ProxyPassMatch ^/etherpad(/?)(.*)$ https://etherpad.jitsi.example.com/etherpad/$2;

I can’t access Etherpad on http://127.0.0.1:9001. it shows Unable to connect.

but on http://13.232.74.121:9001

which components?

Can you please share the entire syntax?

“/etc/init.d/nginx restart” was for me.you can reload too. did you try using local host? @avirath_tech

as I said i can’t access it via localhost. but via the server ip and port.

@avirath_tech Can u plz upload your latest apache config and jitsi-meet config ?
Damencho was right… may be you did wrong, giving location in apache config… there, the location is not the physical location… the location is the pattern (for me,it was simply /etherpad/ which redirect to my http://localhost:9001/ where my etherpad service is running) which will redirect to your etherpad server domain.So try using <Location /etherpad/> instead of <Location /opt/etherpad/etherpad-lite/> or according to damencho’s thinking,may b this should be

ProxyPreserveHost On
ProxyPassMatch /etherpad/ http://13.232.74.121:9001/ ;

for u and make sure to use

etherpad_base: ‘https://crweb.sxcs.in/etherpad/p/’,

in your jitsi meet config.
-This actually activate the share document button and mean,when you click ‘open share document’ it will go to this url. And then when it tries to go this url and the server findout the /etherpad/ pattern match and redirect to actual etherpad server which you configured in apache config (from my view of understanding,can be wrong)
then make sure your etherpad service is working (I cant access the url u mentioned,should be if yours is public ip) and then restart web server and others(prosody/jicofo/videobridge) if necessary.
:face_with_thermometer: should be working,just try by understanding the actual flow
I was facing this few days ago :slight_smile: so I know this situation

When share document button comes and you go to black screen (with “here” tag) by clicking the button not to the etherpad … but you know your “jitsi meet” and “etherpad” server is running perfectly (can be accessed separately by url), then this means

  1. you implemented the share document button and it expects to go etherpad server but button-onclick url cantnt find anything.
  2. so you have the problem in “buttonclick url -> etherpad server” - portion, which actually handled in apache config and try using correct syntax.

Here are the files.

etherpad is installed here - /opt/etherpad/etherpad-lite

crweb.sxcs.in.conf.txt (2.1 KB) crweb.sxcs.in-config.txt (16.0 KB) interface_config.txt (7.7 KB)

I found a post where someone solved his issue by just adding below portion for apache config :

<Location /etherpad/>
ProxyAddHeaders On
ProxyPass http://HOSTNAME/
RequestHeader set X-Forwarded-For REMOTE_ADDR
RequestHeader set X-Forwarded-Host HOST
</Location>

so,for yours,it will be

<Location /etherpad/>
ProxyAddHeaders On
ProxyPass http://13.232.74.121:9001/
RequestHeader set X-Forwarded-For REMOTE_ADDR
RequestHeader set X-Forwarded-Host HOST
</Location>

Try just this set without other unnecessary things (you added ‘/etherpad/p’ instead of just ‘/etherpad/’ in apache config and that Alias portion) and don’t forget to restart/reload the web server with other components (if necessary) after every edit before checking results.