Serve docker-jitsi from subdirectory


#1

Coming from https://github.com/jitsi/jitsi-meet/issues/2422 I wanna know how to configure nginx to serve jitsi-meet from a subdirectory.

Thank you @saghul


#2

hi! i also want to know how to do that, and then i’ll adapt to configure into lighttpd too and post how to do it!


#3

Please, write you problem with all details. How did you install Jitsi Meet? What setup do you already have? You mentioned you used the Docker setup, but only mentioned it in passing, very late in the conversation, this is really relevant in order for us to give you proper help. Is this still the case?


#4

OK, starting from the beginning, all you need to do is configure the webserver to serve /subfolder from the jitsi-meet install folder, which is usually /usr/share/jitsi-meet/

For example is you have /srv/web/wordpress served as webroot and you want to have /conferences serving jitsi-meet from /usr/share/jitsi-meet, you can use in nginx something like “location /conferences” etc. It is important to have a config.js there as a nested sub-location.

Everything else is pure linux troubleshooting, if you have issues please be speciffic, so that we can help.


#5

You understand correctly what @mckaygerhard and me try to do.
The setup is nothing special.
I installed jitsi-meet like github/com/jitsi/docker-jitsi-meet#quick-start (2 links per post limit)
I changed nothing except the jitsi’s config.js and nginx’s meet.conf.
Everything works if I keep these files default but I like to access it using the subdirectory.
My config.js: http://dpaste.com/2NTV9V6
My meet.conf: http://dpaste.com/1NX5R2J

It shouldn’t matter if jitsi lives in a docker container because this is a webserver issue.

all you need to do is configure the webserver

This is what I hear all the times but nginx is very hard to configure.


#6

you have:
root /usr/share/jitsi-meet;
and
location /subfolder{

You want to use the webroot for another application, so make it like this:
root /some/path/to/your/main/webapp;
and then create “subfolder” in your main webapp and put the Jitsi-Meet folder contents there (or just symlink the Jitsi-Meet folder to “subfolder” in your main webapp folder.

If yo have issues, please describe them in detail, otherwise we can’t possibly help you troubleshoot. Tell us what are the errors – either webserver or javascript ones etc.

This is all webserver speciffic, so the config in apache, nginx, lighttpd etc. will be different, but the goal is to serve the jitsi-meet content from a subfolder, after that jitsi-meet will do its thing.


#7

Thank you.
I keep config.js like it is.
Create directory mkdir /usr/share/root
Create a symlink ln -s /usr/share/jitsi-meet /usr/share/root/subfolder
Modify the top of meet.conf

root /usr/share/root;
index subfolder/index.html
error_page 404 subfolder/static/404.html;

With the browser I can access index.html and config.js at the subfolder but at index.html the browser shows a grey window.

Uncaught ReferenceError: interfaceConfig is not defined
at Object. (languageDetector.web.js:23)

On webroot ip:8000/ I get the same grey window and

Uncaught ReferenceError: interfaceConfig is not defined
at Object. (app.bundle.min.js?v=3081:2)

I thought http://ip:8000/ should serve “not found” now.

Nginx error:

open() “/usr/share/root/libs/app.bundle.min.js” failed (2: No such file or directory)

However if I add more location directives to get around these errors I end up with this meet.conf
http://dpaste.com/3WNS2RK

At ip:8000/subfolder/index.html I now have a new video conference named ‘index.html’
At ip:8000/subfolder I get 403 Forbidden
directory index of "/usr/share/root/subfolder/" is forbidden


#8

all you need to do is configure the webserver

obviously you want to get rid of the problem by delegating it to the web server! when seeing the error it seems that the problem is that all the software assumes and takes stolen the root of the webserver, and your trick is to use proxy reverse to “cheat” the jitsi-meet!


#9

I’m preparing a demo install in a subfolder to show you config examples when I have some free time, please be patient. Jitsi Meet is not “stealing” the webserver root, like it was pointed out many times, it can run in a subfolder, it can run in a subdomain.

Yes, this all is a matter of GNU/Linux system administration. Neither the Jitsi core team nor any of the other experts here are trying “to get rid of a problem”.


#10

hi @Yasen_Pramatarov1 thanks for your suppoort, i’ll waith with any hope your results…

but: when i said " to get rid of a problem" it means that seems jitsi-meet does not support in fact that subfolder config and suggestion are to " cheat" the software by using reverse proxy rules


#11

@Yasen_Pramatarov1Is they are using the Docker setup, there is nothing to modify there. Just add the subdirectory in the reverse proxy and that’s it.

There are 2 setups intertwined here, and I asked twice for as many details as possible. People don’t seem to believe this matters so here we are. Modifying the Docker nginx setup is plain wrong.


#12

@saghul I hope I gave you all the details (most are default) you need without cluttering this thread. If not please ask for more.

You say that modifying the docker nginx setup is wrong but what is the right way then?


#13

If you are running the Docker setup and want to serve Jitsi in a subdirectory it means there is already an existing Nginx Instance running.

In that case all you need to do is configure that Nginx to proxy pass /meet to http://localhost:8000 (assuming you used the Docker files defaults).

This way you don’t need to worry about config.js or any other stuff, just pass everything /meet (or whatever other subdirectory you want) to the container.

The different use case is if you are running the quick-install setup in a server where you already have Nginx running, then you ought to do what Yassen suggested.


#14

Of course I modified the existing Nginx instance (inside of the jitsi/web docker). There is no other Nginx instance running in my setup.
This way the solution we possibly find is independent of docker and can be used in a standard nginx setup as well.
Apache subdirectory configuration has been shown to work: https://github.com/jitsi/jitsi-meet/issues/223#issuecomment-90213835
I’m looking forward to Yassen’s demo config.


#15

That’s not the right way to do it.

You should have another Nginx instance on the host machine which proxy’s to the Docker one.