Nginx modules needed?

I installed Jitsi Meet on a Ubuntu 18.04 server by following the quick install guide and everything went fine until trying to restart Nginx after running /usr/share/jitsi-meet/scripts/install-letsencrypt-cert.sh.
It complains about the ngx_http_image_filter_module not being present (referenced from /etc/nginx/modules-enabled/50-mod-http-image-filter.conf). When I removed that file (just to test whether that was the only problem) it complains that /etc/nginx/modules/ngx_http_xslt_filter_module.so cannot be found either (referenced from /etc/nginx/modules-enabled/50-mod-http-xslt-filter.conf).

I installed Nginx on the server before installing Jitsi, and none of the modules referenced by files in /etc/nginx/modules-enabled/ are included by default.

I couldn’t find any mention of the need to compile Nginx with these modules in any of the installation guides and neither in any post in this forum.
What am I missing?
Do I need to compile Nginx with all these modules manually?

Any advice is appreciated!
Thanks!

Not sure why you see those errors, but the packages don’t require them and don’t use them. We have been testing and installing on 18.04 with default nginx works fine.

I think that there are several ways of installing nginx under Ubuntu and you probably picked a way that is not compatible with jitsi. If you can remember/grab from the apt logs how you did it, it would be interesting to add it to the jitsi documentation. I’d advice to scratch jitsi and nginx and redo the installation with letting jitsi install nginx.

I found that purging jitsi and nginx removed the ‘/etc/nginx/sites-available/’, ‘/etc/nginx/sites-enabled’ and the /etc/nginx/modules-enabled/ folders.

If I created them manually after purging then everything installed smoothly.

I suspect the installation script assumes that these directories are already in place and does not try to make them.

Thanks for the replies!

I’m compiling Nginx 1.15.0 from source, since I’m adding a few non-standard modules (brotli, pagespeed, etc.). Is there a minimum Nginx version that Jitsi requires? If so, we should add it to the quick install guide.

After installing Nginx from source, there is no /etc/nginx/modules-enabled folder and neither /usr/share/nginx.

Then after running apt-get install jitsi-meet:

$ sudo ls -lah /etc/nginx/modules-enabled
total 16K
drwxr-xr-x  2 root     root     4.0K Apr 19 08:54 .
drwxr--r-- 16 www-data www-data 4.0K Apr 19 08:54 ..
lrwxrwxrwx  1 root     root       54 Apr 19 08:54 50-mod-http-geoip.conf -> /usr/share/nginx/modules-available/mod-http-geoip.conf
lrwxrwxrwx  1 root     root       61 Apr 19 08:54 50-mod-http-image-filter.conf -> /usr/share/nginx/modules-available/mod-http-image-filter.conf
lrwxrwxrwx  1 root     root       60 Apr 19 08:54 50-mod-http-xslt-filter.conf -> /usr/share/nginx/modules-available/mod-http-xslt-filter.conf
lrwxrwxrwx  1 root     root       48 Apr 19 08:54 50-mod-mail.conf -> /usr/share/nginx/modules-available/mod-mail.conf
lrwxrwxrwx  1 root     root       50 Apr 19 08:54 50-mod-stream.conf -> /usr/share/nginx/modules-available/mod-stream.conf
lrwxrwxrwx  1 root     root       48 Apr 19 08:54 60-jitsi-meet.conf -> /usr/share/jitsi-meet-turnserver/jitsi-meet.conf

I’d advice to scratch jitsi and nginx and redo the installation with letting jitsi install nginx.

I wasn’t aware that Jitsi can/does install Nginx. I think this is not clear from the quick install guide (at least to me). It says:

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.

To me that means if neither Nginx nor Apache are found, it defaults to creating the virtual host for Nginx, not installing Nginx itself. Happy to improve the wording of this in a PR once I get the full picture…

The installation works alright for me and the folders you mentioned are created by the installation scripts.
It’s just that the modules referenced in /etc/nginx/modules-enabled are not found when trying to start Nginx.

I’m happy to compile Nginx with these modules included, just wanted to check if that is indeed necessary.

I have just moved to a new, completely clean server. I will install to it later today. I’ll let you know what happens.
It took me several install and purge cycles to work out what I had to do. Other people may just give up, which would be a shame.

here is the proof that the doc is not up-to-date (as is the case in many places):

Commandline: apt install jitsi-meet
Requested-By: gp (1001)
Install: ca-certificates-java:amd64 (20180516ubuntu1~18.04.1, automatic), libnginx-mod-http-geoip:amd64 (1.14.0-0ubuntu1.7, automatic), libwebp6:amd64 (0.6.1-2, automatic), libcups2:amd64 (2.2.7-1ubuntu2.7, automatic), jitsi-meet-turnserver:amd64 (1.0.3969-1, automatic), libpcsclite1:amd64 (1.8.23-1, automatic), liblcms2-2:amd64 (2.9-1ubuntu0.1, automatic), lua5.1:amd64 (5.1.5-8.1build2, automatic), libevent-core-2.1-6:amd64 (2.1.8-stable-4build1, automatic), lua-filesystem:amd64 (1.6.3-1, automatic), jitsi-videobridge2:amd64 (2.1-164-gfdce823f-1, automatic), libgd3:amd64 (2.2.5-4ubuntu0.4, automatic), lua-bitop:amd64 (1.0.2-5, automatic), libxrender1:amd64 (1:0.9.10-1, automatic), libhiredis0.13:amd64 (0.13.3-2.2, automatic), nginx-core:amd64 (1.14.0-0ubuntu1.7, automatic), lua-expat:amd64 (1.3.0-4, automatic), jicofo:amd64 (1.0-541-1, automatic), libavahi-common-data:amd64 (0.7-3.1ubuntu1.2, automatic), libavahi-common3:amd64 (0.7-3.1ubuntu1.2, automatic), jitsi-meet-web:amd64 (1.0.3969-1, automatic), libevent-pthreads-2.1-6:amd64 (2.1.8-stable-4build1, automatic), prosody:amd64 (0.10.0-1build1, automatic), jitsi-meet:amd64 (2.0.4384-1), libpq5:amd64 (10.12-0ubuntu0.18.04.1, automatic), ssl-cert:amd64 (1.0.39, automatic), fontconfig-config:amd64 (2.12.6-0ubuntu2, automatic), libx11-6:amd64 (2:1.6.4-3ubuntu0.2, automatic), nginx-common:amd64 (1.14.0-0ubuntu1.7, automatic), jitsi-meet-web-config:amd64 (1.0.3969-1, automatic), libtiff5:amd64 (4.0.9-5ubuntu0.3, automatic), libxcb1:amd64 (1.13-2~ubuntu18.04, automatic), libxtst6:amd64 (2:1.2.3-1, automatic), libxi6:amd64 (2:1.7.9-1, automatic), libnginx-mod-http-image-filter:amd64 (1.14.0-0ubuntu1.7, automatic), lua-event:amd64 (0.4.3-2build1, automatic), fonts-dejavu-core:amd64 (2.37-1, automatic), lua-socket:amd64 (3.0~rc1+git+ac3201d-4, automatic), libjpeg8:amd64 (8c-2ubuntu8, automatic), libnginx-mod-mail:amd64 (1.14.0-0ubuntu1.7, automatic), mysql-common:amd64 (5.8+1.0.4, automatic), libfontconfig1:amd64 (2.12.6-0ubuntu2, automatic), libx11-data:amd64 (2:1.6.4-3ubuntu0.2, automatic), libmysqlclient20:amd64 (5.7.29-0ubuntu0.18.04.1, automatic), libjpeg-turbo8:amd64 (1.5.2-0ubuntu5.18.04.3, automatic), openjdk-8-jre-headless:amd64 (8u242-b08-0ubuntu3~18.04, automatic), libjbig0:amd64 (2.1-3.1build1, automatic), libnss3:amd64 (2:3.35-2ubuntu2.7, automatic), coturn:amd64 (4.5.0.7-1ubuntu2.18.04.1, automatic), libfreetype6:amd64 (2.8.1-2ubuntu2, automatic), libnginx-mod-stream:amd64 (1.14.0-0ubuntu1.7, automatic), telnet:amd64 (0.17-41, automatic), libevent-openssl-2.1-6:amd64 (2.1.8-stable-4build1, automatic), x11-common:amd64 (1:7.7+19ubuntu7.1, automatic), libxpm4:amd64 (1:3.5.12-1, automatic), libnginx-mod-http-xslt-filter:amd64 (1.14.0-0ubuntu1.7, automatic), libevent-extra-2.1-6:amd64 (2.1.8-stable-4build1, automatic), libavahi-client3:amd64 (0.7-3.1ubuntu1.2, automatic), java-common:amd64 (0.68ubuntu1~18.04.1, automatic), libnspr4:amd64 (2:4.18-1ubuntu1, automatic), jitsi-meet-prosody:amd64 (1.0.3969-1, automatic), libxext6:amd64 (2:1.3.3-1, automatic), lua-sec:amd64 (0.6-4, automatic), nginx:amd64 (1.14.0-0ubuntu1.7, automatic), libpng16-16:amd64 (1.6.34-1ubuntu0.18.04.2, automatic)

this comes from jitsi-meet-web-config package

Depends: openssl, nginx | nginx-full | nginx-extras | apache2

I guess that you did not do a straight install from source but built a deb package (as recommended for Debian systems of course) else Jitsi packaging would have clashed with your home-grown install.

Hmm no, I actually built Nginx from source (download from nginx.org, run configure, make, make install etc.). I think I didn’t go with a deb package because I couldn’t use/install all the modules that I wanted with it.

Anyways, I am still wondering about /etc/nginx/modules-enabled and the referenced modules. Could somebody confirm (or deny) that this folder exists in their Jitsi installation and the included files/symlinks are these?

$ sudo ls -lah /etc/nginx/modules-enabled
total 16K
drwxr-xr-x  2 root     root     4.0K Apr 19 08:54 .
drwxr--r-- 16 www-data www-data 4.0K Apr 19 08:54 ..
lrwxrwxrwx  1 root     root       54 Apr 19 08:54 50-mod-http-geoip.conf -> /usr/share/nginx/modules-available/mod-http-geoip.conf
lrwxrwxrwx  1 root     root       61 Apr 19 08:54 50-mod-http-image-filter.conf -> /usr/share/nginx/modules-available/mod-http-image-filter.conf
lrwxrwxrwx  1 root     root       60 Apr 19 08:54 50-mod-http-xslt-filter.conf -> /usr/share/nginx/modules-available/mod-http-xslt-filter.conf
lrwxrwxrwx  1 root     root       48 Apr 19 08:54 50-mod-mail.conf -> /usr/share/nginx/modules-available/mod-mail.conf
lrwxrwxrwx  1 root     root       50 Apr 19 08:54 50-mod-stream.conf -> /usr/share/nginx/modules-available/mod-stream.conf
lrwxrwxrwx  1 root     root       48 Apr 19 08:54 60-jitsi-meet.conf -> /usr/share/jitsi-meet-turnserver/jitsi-meet.conf

I will try to let Jitsi install Nginx now and check which modules are installed then.

The first 5 symlinks are created by the default Apt nginx installation, the last one is created by the Apt turnserver installation (if it’s uninstalled, the link is removed)

I installed onto a fresh server yesterday. Unfortunately I
mis-typed the hostname during the install. Everything else went in
flawlessly.

I then discovered my error and tried to fix it. After searching
through various files and re-running certbot, I decided to purge
everything.

I did the purge stuff, but the new install was not correct. When
my brain started to work, I ran htop and looked for prosody,
jicofo and jitsi processes and found some still running. I killed
them, removed the nginx directory and everything then installed
perfectly.

Pretty obvious really!

Perhaps the uninstall and purge section in the quick install
instructions should have the systemctl stop commands added, for
those like me who blindly read and do.

Ok, I got it to work by letting Jitsi install Nginx and looking at the configuration it was installed with:

nginx version: nginx/1.14.0 (Ubuntu)
built with OpenSSL 1.1.1  11 Sep 2018
TLS SNI support enabled
configure arguments: --with-cc-opt='-g -O2 -fdebug-prefix-map=/build/nginx-GkiujU/nginx-1.14.0=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Wdate-time -D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fPIC' --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --modules-path=/usr/lib/nginx/modules --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-pcre-jit --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_v2_module --with-http_dav_module --with-http_slice_module --with-threads --with-http_addition_module --with-http_geoip_module=dynamic --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module=dynamic --with-http_sub_module --with-http_xslt_module=dynamic --with-stream=dynamic --with-stream_ssl_module --with-mail=dynamic --with-mail_ssl_module

Nginx v1.14.0 is from Dec 2018, so I definitely wanted to go with a more up-to-date version.
I precompiled Nginx v1.18.0 with the stream modules that Jitsi seems to need (--with-stream_ssl_preread_module --with-stream --with-stream_ssl_module) and then ran apt-get install jitsi-meet, choosing to not overwrite any of the Nginx files when asked. Then I had to add include /etc/nginx/modules-enabled/*.conf; and include /etc/nginx/sites-enabled/*; to my Nginx config manually and remove everything in /etc/nginx/modules-enabled/ starting with 50-.
Afterwards I ran /usr/share/jitsi-meet/scripts/install-letsencrypt-cert.sh, restarted Nginx and everything is working fine! :slight_smile: