0

For almost two years now I have been running a simple nginx reverse proxy on a Debian instance to serve dockerized services. In case any configuration changes go wrong, I am also using git version control for all important, non-default (manually modified) configuration files on my system.

While rolling back to a previous commit for an (unrelated) issue with my ufw config, the script I have set up as a git hook to restore file permissions warned me about broken symlinks in /etc/nginx/modules-enabled:

┌─○ root@nas1 ∈ /etc/nginx/modules-enabled git:(main)
└──➤  ll
total 8.0K
lrwxrwxrwx 1 root root 54 Jan  9  2022 50-mod-http-geoip.conf.removed -> /usr/share/nginx/modules-available/mod-http-geoip.conf
lrwxrwxrwx 1 root root 61 Jan  9  2022 50-mod-http-image-filter.conf.removed -> /usr/share/nginx/modules-available/mod-http-image-filter.conf
lrwxrwxrwx 1 root root 60 Jan  9  2022 50-mod-http-xslt-filter.conf.removed -> /usr/share/nginx/modules-available/mod-http-xslt-filter.conf
lrwxrwxrwx 1 root root 48 Jan  9  2022 50-mod-mail.conf.removed -> /usr/share/nginx/modules-available/mod-mail.conf
lrwxrwxrwx 1 root root 50 Jan  9  2022 50-mod-stream.conf.removed -> /usr/share/nginx/modules-available/mod-stream.conf
lrwxrwxrwx 1 root root 56 Jan  9  2022 70-mod-stream-geoip.conf.removed -> /usr/share/nginx/modules-available/mod-stream-geoip.conf
┌─○ root@nas1 ∈ /etc/nginx/modules-enabled git:(main)
└──➤  ll /usr/share/nginx/
total 4.0K
drwxr-xr-x 2 root root 4.0K Jul 31 15:52 html
lrwxrwxrwx 1 root root   23 Mar 14  2023 modules -> ../../lib/nginx/modules
┌─○ root@nas1 ∈ /etc/nginx/modules-enabled git:(main)
└──➤  cd /usr/lib/nginx
cd: no such file or directory: /usr/lib/nginx

By itself, I believe this shouldn't be much of an issue, as I am not actually using any of these missing nginx modules, and nginx is running without any issues. I think, everything in modules-enabled was part of the default nginx configuration when I initially set everything up. However, I think this was the first time rolling anything back on this specific system, so I am unsure whether these symlinks were always broken and I just never noticed it or if something went wrong during a system upgrade at some point.

The cause of these broken symlinks seems to be that /usr/share/nginx/modules-available as well as /usr/lib/nginx are missing and I am wondering if that is a serious problem (broken nginx installation), or whether that is just the place where you'd put additional modules if you were using any, and as long as you don't it doesn't matter if that directory exists or not?

So my question is:

Is it a problem that /usr/lib/nginx and /usr/share/nginx/modules-available are missing, or is it basically fine and I can just remove the broken symlinks and not worry about it?

System information:

┌─○ root@nas1 ∈ /etc/nginx/modules-enabled git:(main)
└──➤  nginx -v
nginx version: nginx/1.22.1
┌─○ root@nas1 ∈ /etc/nginx/modules-enabled git:(main)
└──➤  uname -a
Linux nas1 6.1.0-12-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.52-1 (2023-09-07) x86_64 GNU/Linux
┌─○ root@nas1 ∈ /etc/nginx/modules-enabled git:(main)
└──➤  lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 12 (bookworm)
Release:        12
Codename:       bookworm
1
  • What about nginx.conf ? you can check there to know from where are loaded modules and configuration, and fix symlinks if its necesary or delete it.
    – Skamasle
    Nov 13 at 19:39

0

You must log in to answer this question.

Browse other questions tagged .