Score:1

Installing Nginx-extras module, downgrade nginx-1.20 to 1.14 on Debian 10

de flag

I've installed Nginx 1.20 on Debian 10 following this :

Nginx on Debian

I need to install Nginx-extras, but after sudo apt-get install -y nginx-extras when I check Nginx -v it returns 1.14.2 ... (In Ubuntu 20 it downgrade from 1.20 to 1.18)

More Info: When I install Nginx on Debian using default repository, version 1.14.2 will be installed. In my .conf file I need to use delay like this:

limit_req zone=server_ratelimit burst=800 delay=500;

, so get the error :

This version (1.14) not supporting delay

So, I purged Nginx and installed 1.20 version. Now adding some directives, I need to install Nginx-extras, after installing this module, when I check the Nginx version, it shows 1.14, but delay throw no errors, it means that the version is not 1.14 ?!

I need to know, what is the real version of my Nginx? If it is 1.14 so why delay throw no error, If it is 1.20 why the Nginx -v returns 1.14 ??

Update 1 :

apt-cache show nginx-extras Package: returns :

Package: nginx-extras
Source: nginx
Version: 1.14.2-2+deb10u3
Installed-Size: 1277
Maintainer: Debian Nginx Maintainers <[email protected]>
Architecture: amd64
Provides: httpd, httpd-cgi, nginx
Depends: libnginx-mod-http-auth-pam (= 1.14.2-2+deb10u3), libnginx-mod-http-cache-purge (= 1.14.2-2+deb10u3), libnginx-mod-http-dav-ext (= 1.14.2-2+deb10u3), libnginx-mod-http-echo (= 1.14.2-2+deb10u3), libnginx-mod-http-fancyindex (= 1.14.2-2+deb10u3), libnginx-mod-http-geoip (= 1.14.2-2+deb10u3), libnginx-mod-http-headers-more-filter (= 1.14.2-2+deb10u3), libnginx-mod-http-image-filter (= 1.14.2-2+deb10u3), libnginx-mod-http-lua (= 1.14.2-2+deb10u3), libnginx-mod-http-perl (= 1.14.2-2+deb10u3), libnginx-mod-http-subs-filter (= 1.14.2-2+deb10u3), libnginx-mod-http-uploadprogress (= 1.14.2-2+deb10u3), libnginx-mod-http-upstream-fair (= 1.14.2-2+deb10u3), libnginx-mod-http-xslt-filter (= 1.14.2-2+deb10u3), libnginx-mod-mail (= 1.14.2-2+deb10u3), libnginx-mod-nchan (= 1.14.2-2+deb10u3), libnginx-mod-stream (= 1.14.2-2+deb10u3), nginx-common (= 1.14.2-2+deb10u3), libc6 (>= 2.28), libpcre3, libssl1.1 (>= 1.1.0), zlib1g (>= 1:1.1.4)
Suggests: nginx-doc (= 1.14.2-2+deb10u3)
Conflicts: nginx-full, nginx-light
Breaks: nginx (<< 1.4.5-1)
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 package 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,
 Stream, SSL Preread, Stub Status, Substitution, Thread Pool, Upstream,
 User ID, XSLT.
 .
 MAIL MODULES: Mail Core, Auth HTTP, Proxy, SSL, IMAP, POP3, SMTP.
 .
 THIRD PARTY MODULES: Auth PAM, Cache Purge, DAV Ext, Echo, Fancy Index,
 Headers More, Embedded Lua, HTTP Substitutions, Nchan, Upload Progress,
 Upstream Fair Queue.
Description-md5: 225aac32714dab461692d2628eac8f17
Homepage: https://nginx.net
Section: httpd
Priority: optional
Filename: pool/main/n/nginx/nginx-extras_1.14.2-2+deb10u3_amd64.deb
Size: 515148
MD5sum: 63868ff73f9ea92b604394fb2b793be2
SHA256: bc67168fb3a20bda1d9c50fc56a65dbeb04da9cd8046faac2e0bead1f6035e81

dpkg -s nginx-extras | grep '^Version:' returns:

Version: 1.14.2-2+deb10u3

And good to know that, after installing sudo apt-get install -y nginx-extras, still get error on Debian 10 (Not Ubuntu) :

unknown directive "more_set_headers" in /etc/nginx/nginx.conf:53

Update-2 : cat /etc/apt/sources.list.d/nginx.list returns:

deb http://nginx.org/packages/debian buster nginx

ru flag
What does `apt-cache show nginx-extras` show as version?
digijay avatar
mx flag
What's the output of `dpkg -s nginx-extras | grep '^Version:'`?
ehsan_kabiri_33 avatar
de flag
Post updated. Thanks in advance.
ru flag
Please add `cat /etc/apt/sources.list.d/nginx.list`
Score:0
ru flag

You should use the nginx package instead of the extras package if you want to use the nginx install page

The 1.14 package for nginx-extras is coming from the base repo of debian.

You can install separate module like this:

apt-get install libnginx-mod-http-headers-more-filter

ehsan_kabiri_33 avatar
de flag
Would you mind telling me how to change the `Nginx-extras` repo ? Before running the code `apt-get install nginx-extras` what should I do to change the base repo of debian ?
ru flag
You already have it installed. You probably don't need the nginx-extras. `apt-get remove nginx-extras && apt-get install nginx` will probably do it for you.
ehsan_kabiri_33 avatar
de flag
Thanks. After `sudo apt-get purge nginx-common nginx-extras` and `sudo apt-get autoremove` and `sudo apt-get remove nginx nginx-common` and following instructions : http://nginx.org/en/linux_packages.html#Debian and installing Nginx 1.20, and then installing `apt-get install nginx-extras` , still error on `more_set_headers directive is unknown` means that `problem in nginx-extras ver 1.14
ru flag
Why do you install nginx-extras? The package should not be needed.
ehsan_kabiri_33 avatar
de flag
Thanks for taking time. To resolve `more_set_headers directive is unknown` I used to install `nginx-extras` on Ubuntu and now I do it in Debian. and to use the `delay` in rate limiting, I need Nginx version's higher than default Repo which is 1.14.
ru flag
Remove it and use the seperate packages `apt-get install libnginx-mod-http-headers-more-filter`
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.