oerdnj / deb.sury.org

Public bugreports for anything ppa:ondrej/*
818 stars 27 forks source link

Ubuntu 24.04 - cannot install nginx-extra #2175

Closed massej closed 2 months ago

massej commented 2 months ago

I try to install nginx-extra on Ubuntu 24.04 (nobel) but it doesn't work

13.99 Reading state information... 14.53 Some packages could not be installed. This may mean that you have 14.53 requested an impossible situation or if you are using the unstable 14.53 distribution that some required packages have not yet been created 14.53 or been moved out of Incoming. 14.53 The following information may help to resolve the situation: 14.53 14.53 The following packages have unmet dependencies: 15.01 libnginx-mod-http-lua : Depends: libluajit-5.1-2 (>= 2.1-20220411) but it is not installable or 15.01 libluajit-5.1-2 (>= 2.1.0~beta3) but it is not installable 15.02 E: Unable to correct problems, you have held broken packages.

It there a way to install 2.1-20220411 or 2.1.0~beta3 on 24.04?

In the Ubuntu 24.04 it's using libluajit-5.1-2 (2.1.0+git20231223.c525bcb+dfsg-1)

Note : I'm using

add-apt-repository ppa:ondrej/nginx-mainline -y apt-get install libluajit2-5.1-2 libluajit2-5.1-common -y apt-get update apt-get install nginx-common -y apt-get install nginx-extras -y

oerdnj commented 2 months ago

Since you didn't use the bug template (WHY?), you need to go here, check what information I need and fill in the details manually: https://github.com/oerdnj/deb.sury.org/blob/master/.github/ISSUE_TEMPLATE/bug_report.md and add this to this bug.

Also why are you doing: apt-get install libluajit2-5.1-2 libluajit2-5.1-common -y, you should let the apt solver to pick the luajit library for you.

massej commented 2 months ago

name: Bug report about: "WARNING: if you don't use the template, the issue will be closed possibly even without a comment WARNING" title: 'Ubuntu 24.04 - cannot install nginx-extra' labels: 'nginx-extra' assignees: ''


Frequently asked questions

Describe the bug I try to install nginx-extra on Ubuntu 24.04 (nobel) but it doesn't work

13.99 Reading state information... 14.53 Some packages could not be installed. This may mean that you have 14.53 requested an impossible situation or if you are using the unstable 14.53 distribution that some required packages have not yet been created 14.53 or been moved out of Incoming. 14.53 The following information may help to resolve the situation: 14.53 14.53 The following packages have unmet dependencies: 15.01 libnginx-mod-http-lua : Depends: libluajit-5.1-2 (>= 2.1-20220411) but it is not installable or 15.01 libluajit-5.1-2 (>= 2.1.0~beta3) but it is not installable 15.02 E: Unable to correct problems, you have held broken packages.

image

It there a way to install 2.1-20220411 or 2.1.0~beta3 on 24.04?

In the Ubuntu 24.04 it's using libluajit-5.1-2 (2.1.0+git20231223.c525bcb+dfsg-1)

To Reproduce add-apt-repository ppa:ondrej/nginx-mainline -y apt-get install libluajit2-5.1-2 libluajit2-5.1-common -y apt-get update apt-get install nginx-common -y apt-get install nginx-extras -y

Your understanding of what is happening Conflict version (the required version doesnt exist in Ubuntu 24.04)

What steps did you take to resolve issue yourself before reporting it here Downgrade to Ubuntu 22.04 fix the issue

Expected behavior To have nginx-extra installed

Distribution (please complete the following information):

Package(s) (please complete the following information): libluajit-5.1-2: Installed: (none) Candidate: 2.1.0+openresty20240626-1+ubuntu24.04.1+deb.sury.org+1 Version table: 2.1.0+openresty20240626-1+ubuntu24.04.1+deb.sury.org+1 500 500 https://ppa.launchpadcontent.net/ondrej/nginx-mainline/ubuntu noble/main amd64 Packages 2.1.0+git20231223.c525bcb+dfsg-1 500 500 http://ca.archive.ubuntu.com/ubuntu noble/universe amd64 Packages image Additional context Even if you don't install libluajit2-5.1-2 or libluajit2-5.1-common before it still doesnt work with the same error.

I also tried with the ubuntu 24.04 docker image, same issue is happening

~

oerdnj commented 2 months ago

Ok, I still miss: apt-cache policy libnginx-mod-http-lua output?

massej commented 2 months ago

Ok, I still miss: apt-cache policy libnginx-mod-http-lua output?

image

oerdnj commented 2 months ago

Don’t paste screenshots of the terminal. Copy and paste text into backticks.

What happens when you try to install the version it actually needs? E.g. apt-get install libluajit-5.1-2

massej commented 2 months ago

Don’t paste screenshots of the terminal. Copy and paste text into backticks.

What happens when you try to install the version it actually needs? E.g. apt-get install libluajit-5.1-2

root@UBUNTU:/home/masjon2302# apt-get install libluajit-5.1-2 Reading package lists... Done Building dependency tree... Done Reading state information... Done The following additional packages will be installed: libluajit-5.1-common The following NEW packages will be installed: libluajit-5.1-2 libluajit-5.1-common 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 328 kB of archives. After this operation, 845 kB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 https://ppa.launchpadcontent.net/ondrej/nginx-mainline/ubuntu noble/main amd64 libluajit-5.1-common all 2.1.0+openresty20240626-1+ubuntu24.04.1+deb.sury.org+1 [49.1 kB] Get:2 https://ppa.launchpadcontent.net/ondrej/nginx-mainline/ubuntu noble/main amd64 libluajit-5.1-2 amd64 2.1.0+openresty20240626-1+ubuntu24.04.1+deb.sury.org+1 [279 kB] Fetched 328 kB in 1s (378 kB/s)
Selecting previously unselected package libluajit-5.1-common. (Reading database ... 188789 files and directories currently installed.) Preparing to unpack .../libluajit-5.1-common_2.1.0+openresty20240626-1+ubuntu24.04.1+deb.sury.org+1_all.deb ... Unpacking libluajit-5.1-common (2.1.0+openresty20240626-1+ubuntu24.04.1+deb.sury.org+1) ... Selecting previously unselected package libluajit-5.1-2:amd64. Preparing to unpack .../libluajit-5.1-2_2.1.0+openresty20240626-1+ubuntu24.04.1+deb.sury.org+1_amd64.deb ... Unpacking libluajit-5.1-2:amd64 (2.1.0+openresty20240626-1+ubuntu24.04.1+deb.sury.org+1) ... Setting up libluajit-5.1-common (2.1.0+openresty20240626-1+ubuntu24.04.1+deb.sury.org+1) ... Setting up libluajit-5.1-2:amd64 (2.1.0+openresty20240626-1+ubuntu24.04.1+deb.sury.org+1) ... Processing triggers for libc-bin (2.39-0ubuntu8.2) ... oot@UBUNTU:/home/masjon2302#

oerdnj commented 2 months ago

And after that it still doesn’t work?

Can you show the output of apt-cache show libnginx-mod-http-lua?

massej commented 2 months ago

It still doesnt work (even if libluajit-5.1-2 is installed) : root@UBUNTU:/home/masjon2302# apt-get install nginx-extras Reading package lists... Done Building dependency tree... Done Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:

The following packages have unmet dependencies: libnginx-mod-http-lua : Depends: libluajit-5.1-2 (>= 2.1-20220411) but it is not installable or libluajit-5.1-2 (>= 2.1.0~beta3) but it is not installable E: Unable to correct problems, you have held broken packages.

Here is the output of apt-cache show libnginx-mod-http-lua root@UBUNTU:/home/masjon2302# apt-cache show libnginx-mod-http-lua Package: libnginx-mod-http-lua Source: libnginx-mod-http-lua (1:0.10.26-2+ubuntu24.04.1+deb.sury.org+7) Priority: optional Section: httpd Installed-Size: 460 Maintainer: Debian Nginx Maintainers pkg-nginx-maintainers@alioth-lists.debian.net Architecture: amd64 Version: 1:0.10.26+1.27.0-2+ubuntu24.04.1+deb.sury.org+7 Recommends: nginx Depends: lua-resty-core (<< 0.1.28.1~), lua-resty-core (>= 0.1.28), libnginx-mod-http-ndk, nginx-abi-1.27.0-1, libc6 (>= 2.33), libluajit-5.1-2 (>= 2.1-20220411) | libluajit-5.1-2 (>= 2.1.0~beta3) Filename: pool/main/libn/libnginx-mod-http-lua/libnginx-mod-http-lua_0.10.26+1.27.0-2+ubuntu24.04.1+deb.sury.org+7_amd64.deb Size: 170172 MD5sum: f01f0d07f152298e6f84e16d5b1024c3 SHA1: d2b8ba94407bde5e247afeda17cb9e3959994d7a SHA256: 720fe478dd6f78961fdaad1e63cf3b416373c2ee778008be26a3cad6f8532a9a Description-en: Lua module for Nginx Embed Lua runtime into nginx. . This module embeds Lua, via LuaJIT 2-5.1, into Nginx and by leveraging Nginx's subrequests, allows the integration of the powerful Lua threads (Lua coroutines) into the Nginx event model. Description-md5: 54f5fee9d10603d78e3df169c29b9a06 Multi-Arch: foreign

Package: libnginx-mod-http-lua Architecture: amd64 Version: 1:0.10.26-2 Multi-Arch: foreign Priority: optional Section: universe/httpd Origin: Ubuntu Maintainer: Ubuntu Developers ubuntu-devel-discuss@lists.ubuntu.com Original-Maintainer: Debian Nginx Maintainers pkg-nginx-maintainers@alioth-lists.debian.net Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 456 Depends: lua-resty-core (<< 0.1.28.1~), lua-resty-core (>= 0.1.28), libnginx-mod-http-ndk, nginx-abi-1.24.0-1, libc6 (>= 2.33), libluajit2-5.1-2 (>= 2.1-20220411) | libluajit-5.1-2 (>= 2.1.0~beta3) Recommends: nginx Filename: pool/universe/libn/libnginx-mod-http-lua/libnginx-mod-http-lua_0.10.26-2_amd64.deb Size: 167788 MD5sum: 51550f944fd1d61046bd9082e5cc9c1d SHA1: 40c376477dfeddeeaa6fbbda6a75ebd4e945e894 SHA256: 230b8b57b8865e4c498fd9f5106cba8f2d5bbc4a34fa4212f2c723162471355c SHA512: f4fe14b8fde7cc6d808ffed72fd7ad754eb443ab61823de2d6f31c646c02b63d054ac6e34723357901c9b8ce8fa4536081ed251a6f22bfcd0da109b440a20748 Homepage: https://github.com/openresty/lua-nginx-module Description-en: Lua module for Nginx Embed Lua runtime into nginx. . This module embeds Lua, via LuaJIT 2-5.1, into Nginx and by leveraging Nginx's subrequests, allows the integration of the powerful Lua threads (Lua coroutines) into the Nginx event model. Description-md5: 54f5fee9d10603d78e3df169c29b9a06

oerdnj commented 2 months ago

Hmm, one idea - can you show me apt-cache show nginx-extra? There might be some leftover dependency…

(I’m not on computer, so I rely on your outputs…)

massej commented 2 months ago

root@UBUNTU:/home/masjon2302# apt-cache show nginx-extra N: Can't select versions from package 'nginx-extra' as it is purely virtual N: No packages found root@UBUNTU:/home/masjon2302#

massej commented 2 months ago

I have the feeling that it sees the newer version in Ubuntu 24.04 : libluajit-5.1-2:amd64 (2.1.0+openresty20240626-1+ubuntu24.04.1+deb.sury.org+1) as a lower version than libluajit-5.1-2 (>= 2.1.0~beta3)

Ubuntu 24.04 doesn't have the older version (beta 3) available in the repo though.

If you check (the beta 3 is not there for Nobel - Ubuntu 24.04) https://packages.ubuntu.com/search?keywords=libluajit-5.1-2

oerdnj commented 2 months ago

Nope, ~ is lower than + in dpkg version arithmetic.

oerdnj commented 2 months ago

root@UBUNTU:/home/masjon2302# apt-cache show nginx-extra N: Can't select versions from package 'nginx-extra' as it is purely virtual N: No packages found root@UBUNTU:/home/masjon2302#

This should have been nginx-extras.

massej commented 2 months ago

My bad

Here it is with nginx-extras :

root@UBUNTU:/home/masjon2302# apt-cache show nginx-extras Package: nginx-extras Source: nginx Priority: optional Section: httpd Installed-Size: 25 Maintainer: Debian Nginx Maintainers pkg-nginx-maintainers@alioth-lists.debian.net Architecture: amd64 Version: 1.27.0-2+ubuntu24.04.1+deb.sury.org+1 Depends: nginx (= 1.27.0-2+ubuntu24.04.1+deb.sury.org+1), libnginx-mod-http-geoip (= 1.27.0-2+ubuntu24.04.1+deb.sury.org+1), libnginx-mod-http-image-filter (= 1.27.0-2+ubuntu24.04.1+deb.sury.org+1), libnginx-mod-http-perl (= 1.27.0-2+ubuntu24.04.1+deb.sury.org+1), libnginx-mod-http-xslt-filter (= 1.27.0-2+ubuntu24.04.1+deb.sury.org+1), libnginx-mod-mail (= 1.27.0-2+ubuntu24.04.1+deb.sury.org+1), libnginx-mod-stream (= 1.27.0-2+ubuntu24.04.1+deb.sury.org+1), libnginx-mod-stream-geoip (= 1.27.0-2+ubuntu24.04.1+deb.sury.org+1), libnginx-mod-http-auth-pam (>= 1:1.5.5+1.27.0), libnginx-mod-http-cache-purge (>= 1:2.3+1.27.0), libnginx-mod-http-dav-ext (>= 1:3.0.0+1.27.0), libnginx-mod-http-echo (>= 1:0.63+1.27.0), libnginx-mod-http-fancyindex (>= 1:0.5.2+1.27.0), libnginx-mod-http-geoip2 (>= 1:3.4+1.27.0), libnginx-mod-http-headers-more-filter (>= 1:0.34+1.27.0), libnginx-mod-http-lua (>= 1:0.10.26+1.27.0), libnginx-mod-http-subs-filter (>= 1:0.6.4-6+1.27.0), libnginx-mod-http-uploadprogress (>= 1:0.9.2+1.27.0), libnginx-mod-http-upstream-fair (>= 1:0.0~git20120408.a18b409+1.27.0), libnginx-mod-nchan (>= 1:1.3.6+dfsg+1.27.0~), libnginx-mod-stream-geoip2 (>= 1:3.4+1.27.0) Filename: pool/main/n/nginx/nginx-extras_1.27.0-2+ubuntu24.04.1+deb.sury.org+1_amd64.deb Size: 12624 MD5sum: 47d1ccb520fb4e9b51eaac43e964f6d5 SHA1: 8b57312f5e8b53f1ebcc796a25ab2f7a8951371e SHA256: 5928d24a251ca9068d97d2ce36c5a1a4c42b3241ecb7da50e0b32db39a017cab Description-en: nginx web/proxy server (extended version) Nginx ("engine X") is a high-performance web and reverse proxy server created by Igor Sysoev. It can be used both as a standalone web server and as a proxy to reduce the load on back-end HTTP or mail servers. . This metapackage provides a version of nginx with the standard modules, plus extra features and modules such as the Perl module, which allows the addition of Perl in configuration files. . STANDARD HTTP MODULES: Core, Access, Auth Basic, Auto Index, Browser, Empty GIF, FastCGI, Geo, Limit Connections, Limit Requests, Map, Memcached, Proxy, Referer, Rewrite, SCGI, Split Clients, UWSGI. . OPTIONAL HTTP MODULES: Addition, Auth Request, Charset, WebDAV, FLV, GeoIP, Gunzip, Gzip, Gzip Precompression, Headers, HTTP/2, Image Filter, Index, Log, MP4, Embedded Perl, Random Index, Real IP, Slice, Secure Link, SSI, SSL, SSL Preread, Stub Status, Substitution, Thread Pool, Upstream, User ID, XSLT. . OPTIONAL MAIL MODULES: Mail Core, Auth HTTP, Proxy, SSL, IMAP, POP3, SMTP. . OPTIONAL STREAM MODULES: Stream, GeoIP, GeoIP2 . THIRD PARTY MODULES: Auth PAM, Cache Purge, DAV Ext, Echo, Fancy Index, GeoIP2, Headers More, Embedded Lua, HTTP Substitutions, Nchan, Upload Progress, Upstream Fair Queue. Description-md5: 1d3b9fb345563354827d5cafdc42a135

Package: nginx-extras Architecture: amd64 Version: 1.24.0-2ubuntu7 Priority: optional Section: universe/httpd Source: nginx Origin: Ubuntu Maintainer: Ubuntu Developers ubuntu-devel-discuss@lists.ubuntu.com Original-Maintainer: Debian Nginx Maintainers pkg-nginx-maintainers@alioth-lists.debian.net Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 29 Depends: nginx (= 1.24.0-2ubuntu7), libnginx-mod-http-geoip (= 1.24.0-2ubuntu7), libnginx-mod-http-image-filter (= 1.24.0-2ubuntu7), libnginx-mod-http-perl (= 1.24.0-2ubuntu7), libnginx-mod-http-xslt-filter (= 1.24.0-2ubuntu7), libnginx-mod-mail (= 1.24.0-2ubuntu7), libnginx-mod-stream (= 1.24.0-2ubuntu7), libnginx-mod-stream-geoip (= 1.24.0-2ubuntu7), libnginx-mod-http-auth-pam (>= 1:1.5.3-4~), libnginx-mod-http-cache-purge (>= 1:2.3-5~), libnginx-mod-http-dav-ext (>= 1:3.0.0-4~), libnginx-mod-http-echo (>= 1:0.63-5~), libnginx-mod-http-fancyindex (>= 1:0.5.2-4~), libnginx-mod-http-geoip2 (>= 1:3.4-4~), libnginx-mod-http-headers-more-filter (>= 1:0.34-4~), libnginx-mod-http-subs-filter (>= 1:0.6.4-5~), libnginx-mod-http-uploadprogress (>= 1:0.9.2-4~), libnginx-mod-http-upstream-fair (>= 1:0.0~git20120408.a18b409-4~), libnginx-mod-nchan (>= 1:1.3.6+dfsg-3~), libnginx-mod-stream-geoip2 (>= 1:3.4-4~) Filename: pool/universe/n/nginx/nginx-extras_1.24.0-2ubuntu7_amd64.deb Size: 4914 MD5sum: 872857f156ae0e1a06075ad083e0a96b SHA1: b8695a58704739112b5bac05f4b225343177232b SHA256: 6ad848d8c9d25a9c9f3c35be28787a6df210c916b3be960a28e3f7da25a1908c SHA512: 18ab5b53fc8b6c9780a8ffa007440da71b5a1caa9165554c6b9a95c3052a8919ec4276569e2a397b889dceea0efef6877b49ddb229fff11852d7704b3614edfb Homepage: https://nginx.org Description-en: nginx web/proxy server (extended version) Nginx ("engine X") is a high-performance web and reverse proxy server created by Igor Sysoev. It can be used both as a standalone web server and as a proxy to reduce the load on back-end HTTP or mail servers. . This metapackage provides a version of nginx with the standard modules, plus extra features and modules such as the Perl module, which allows the addition of Perl in configuration files. . STANDARD HTTP MODULES: Core, Access, Auth Basic, Auto Index, Browser, Empty GIF, FastCGI, Geo, Limit Connections, Limit Requests, Map, Memcached, Proxy, Referer, Rewrite, SCGI, Split Clients, UWSGI. . OPTIONAL HTTP MODULES: Addition, Auth Request, Charset, WebDAV, FLV, GeoIP, Gunzip, Gzip, Gzip Precompression, Headers, HTTP/2, Image Filter, Index, Log, MP4, Embedded Perl, Random Index, Real IP, Slice, Secure Link, SSI, SSL, SSL Preread, Stub Status, Substitution, Thread Pool, Upstream, User ID, XSLT. . OPTIONAL MAIL MODULES: Mail Core, Auth HTTP, Proxy, SSL, IMAP, POP3, SMTP. . OPTIONAL STREAM MODULES: Stream, GeoIP, GeoIP2 . THIRD PARTY MODULES: Auth PAM, Cache Purge, DAV Ext, Echo, Fancy Index, GeoIP2, Headers More, Embedded Lua, HTTP Substitutions, Nchan, Upload Progress, Upstream Fair Queue. Description-md5: 1d3b9fb345563354827d5cafdc42a135

root@UBUNTU:/home/masjon2302#

oerdnj commented 2 months ago

Should be fine in about an hour. lua-resty-core and lua-resty-lrucache was missing rebuilt packages in the repository. Thanks for the report.

GreggGreen commented 1 month ago

This is still a problem for me. I had to: apt install nginx=1.24.0-2ubuntu7 in order to install nginx-extras. It won't work with 1.26.

sudo apt install nginx-extras
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 nginx-extras : Depends: nginx (= 1.24.0-2ubuntu7) but 1.26.1-2~noble is to be installed
                Depends: libnginx-mod-http-geoip (= 1.24.0-2ubuntu7) but it is not going to be installed
                Depends: libnginx-mod-http-image-filter (= 1.24.0-2ubuntu7) but it is not going to be installed
                Depends: libnginx-mod-http-perl (= 1.24.0-2ubuntu7) but it is not going to be installed
                Depends: libnginx-mod-http-xslt-filter (= 1.24.0-2ubuntu7) but it is not going to be installed
                Depends: libnginx-mod-mail (= 1.24.0-2ubuntu7) but it is not going to be installed
                Depends: libnginx-mod-stream (= 1.24.0-2ubuntu7) but it is not going to be installed
                Depends: libnginx-mod-stream-geoip (= 1.24.0-2ubuntu7) but it is not going to be installed
                Depends: libnginx-mod-http-auth-pam (>= 1:1.5.3-4~) but it is not going to be installed
                Depends: libnginx-mod-http-cache-purge (>= 1:2.3-5~) but it is not going to be installed
                Depends: libnginx-mod-http-dav-ext (>= 1:3.0.0-4~) but it is not going to be installed
                Depends: libnginx-mod-http-echo (>= 1:0.63-5~) but it is not going to be installed
                Depends: libnginx-mod-http-fancyindex (>= 1:0.5.2-4~) but it is not going to be installed
                Depends: libnginx-mod-http-geoip2 (>= 1:3.4-4~) but it is not going to be installed
                Depends: libnginx-mod-http-headers-more-filter (>= 1:0.34-4~) but it is not going to be installed
                Depends: libnginx-mod-http-subs-filter (>= 1:0.6.4-5~) but it is not going to be installed
                Depends: libnginx-mod-http-uploadprogress (>= 1:0.9.2-4~) but it is not going to be installed
                Depends: libnginx-mod-http-upstream-fair (>= 1:0.0~git20120408.a18b409-4~) but it is not going to be installed
                Depends: libnginx-mod-nchan (>= 1:1.3.6+dfsg-3~) but it is not going to be installed
                Depends: libnginx-mod-stream-geoip2 (>= 1:3.4-4~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
adamhospodka commented 2 weeks ago

I eventually figured a way that works, in Docker as well. Was trying to make the more_clear_headers Server; command work.

I had to load the module inside the nginx.conf file like so:

1. Write Dockerfile with the latest version of nginx that nginx-extras support (source)

FROM nginx:1.21.0 
RUN apt-get update
RUN apt-get install nginx-common -y
RUN apt-get install nginx-extras -y

2. Build the image

docker build --no-cache -t nginx-with-extensions .

3. Run container (I'm using docker compose)

docker compose up -d

3. Verify that the modules installed on the on the running container

docker ps #to read the container id
docker exec -it {contianer_id} /bin/bash

now the container shell will open

nginx -V

And I looked for the module between the --add-dynamic-module params. I found the one I was looking or -> http-headers-more-filter written as --add-dynamic-module=/build/nginx-FlcIR2/nginx-1.14.2/debian/modules/http-headers-more-filter.

4. Locate where are the modules installed

I also extractex the actual path where the modules are stored from --modules-path=/usr/lib/nginx/modules

5. Load the module in the nginx.conf On the top level of my nginx.conf I pasted the load command.

load_module /usr/lib/nginx/modules/ngx_http_headers_more_filter_module.so;

6. Restart the container To finish it off, I uncommented the more_clear_headers Server; and then on my machine put docker compose up -d. I have the nginx.conf file mapped to the nginx container using volumes, so it worked ok.

Hope this helps some other lost souls!