aboutsummaryrefslogtreecommitdiffstats
path: root/main/nginx
diff options
context:
space:
mode:
Diffstat (limited to 'main/nginx')
-rw-r--r--main/nginx/APKBUILD21
-rw-r--r--main/nginx/nginx.conf8
-rw-r--r--main/nginx/nginx.post-upgrade47
-rw-r--r--main/nginx/stream.conf2
4 files changed, 32 insertions, 46 deletions
diff --git a/main/nginx/APKBUILD b/main/nginx/APKBUILD
index 7a30ccffa4..f543a9d821 100644
--- a/main/nginx/APKBUILD
+++ b/main/nginx/APKBUILD
@@ -30,10 +30,10 @@ pkgname=nginx
# NOTE: Upgrade only to even-numbered versions (e.g. 1.14.z, 1.16.z)!
# Odd-numbered versions are mainline (development) versions.
pkgver=1.22.0
-pkgrel=2
+pkgrel=7
# Revision of nginx-tests to use for check().
-_tests_hgrev=8f13779e2cde
-_njs_ver=0.7.5
+_tests_hgrev=bd21a4a7c9f5
+_njs_ver=0.7.6
pkgdesc="HTTP and reverse proxy server (stable version)"
url="https://www.nginx.org/"
arch="all"
@@ -47,7 +47,7 @@ makedepends="
libxml2-dev
libxslt-dev
linux-headers
- openssl-dev
+ openssl-dev>3
pcre-dev
perl-dev
pkgconf
@@ -209,6 +209,8 @@ _add_module "http-shibboleth" "v2.0.1" "https://github.com/nginx-shib/nginx-http
_add_module "http-untar" "v1.1" "https://github.com/ajax16384/ngx_http_untar_module"
+_add_module "http-upload" "2.3.0" "https://github.com/fdintino/nginx-upload-module"
+
_add_module "http-upload-progress" "v0.9.2" "https://github.com/masterzen/nginx-upload-progress-module"
_http_upload_progress_so="ngx_http_uploadprogress_module.so"
@@ -450,7 +452,7 @@ _module() {
;;
stream)
mkdir -p ./etc/nginx/stream.d
- install -m644 "$srcdir"/stream.conf ./etc/nginx/stream.conf
+ install -m644 -D "$srcdir"/stream.conf ./etc/nginx/conf.d/stream.conf
;;
esac
}
@@ -462,8 +464,8 @@ getvar() {
sha512sums="
074782dba9cd5f8f493fbb57e20bda6dc9171814d919a47ee9f825d93f12c9f9d496e25d063c983191b55ad6a236bcef252ce16ecc1d253dc8b23433557559b1 nginx-1.22.0.tar.gz
-40535031f81a3775cdd2da9cb38307a736f0346db348f758d37e8f4cf7d929ea0685c579a52b299526bf0f911896f2f9fb09d8532cd012563f3988d5a46e4e63 nginx-tests-8f13779e2cde.tar.gz
-9f0dc6bda06a0db5a92c45b6d8048c2fbb4e2b43a10d050dd3b2de820da425367808d4262bfc8d8e60ed1350bdabb42d1611f373c3da8c88818e266c46f79c78 nginx-njs-0.7.5.tar.gz
+13ad8b3f7626f7fa11a1c395ccb361babb1b896789f8eda4350c7b214ec0c4674b9bfec253d29f6e82788da21a1b60cf2b0baef54f3ed2e5e404f286a6a9fbe7 nginx-tests-bd21a4a7c9f5.tar.gz
+ef7d362c5d6c48d302ee0d74b72d7e1c19a14c414cc49432c33b2873c118717343c7fa195e210246b35c643ce98cd8ef8a07946dfce57c75f77255a215c57bd4 nginx-njs-0.7.6.tar.gz
4c7a94aaebbb69599b0067e74f9f3db54ec383ca9499292fec5b875bb0b5859aa11dc14cef5664c94dd54aba231f31e85feacddc49f7622aa4d0fdb38709b6e1 nginx-dav-ext-module~pr-56.patch
fdd66e433126e194a3ef22737993191a04fcc4c8caa044b27cb22bea0e7f16c8fdbc900553507d2bb541cdb82b542845a297db2a48c2460a38dd772d0ebfca9d nginx-dav-ext-module~pr-62.patch
fa96e91f495e9891c03730bcafd948e597e7c5d74f2d30df0a8483ae04f7b30c89065a994a0baa5245470f8991db5844b26da925b23ff26c178a384f5f1a887c nginx-module-vts~01-938c19d.patch
@@ -478,9 +480,9 @@ dfcfd4dd14ccb205ea80d28eae8cadd123015d5eddc004a31b7742d8117c69cad1b56868ba94dd75
ac0f912ae90e0083cc761a622290223edeed0bd32213bbe766d637ac2dfd9835d163e5d16ef28740cbad05d6d92cc418d62df3413c70b4f2c63db02f8ca1c7cc nginx_cookie_flag_module~fix-mem-allocations.patch
4db527d663dbe9e8b503c3cbaa4eae34b45990a5359b3bb98ce970c705faefcac98de49439f2557756a2be8e2e06acc67f98942de01674c498832d80c3cb90c3 njs~mktemp-busybox-compat.patch
df1d910d5a433ef8aa6620e46bd46cb82c45c840e35420bf81a76e5a868ac73ad88aa3934d1c11bcf004a88a9cd13bf69a96ee1b08540251b09903a30430b199 njs~nginx-1.20.x-compat.patch
-9c5ee975dffa15b76688ef798371635f38f1e6773b143c738add26297878dddfc20ebf276e3871a60f28b197e8a70496ca17d4816c2136171978c157bb8e591f nginx.conf
+f6f44b8f17d079ef4db4fc0507672e7aaa6b93cbae10f24c91232f089a8b7a0c2db92a148b2a16b1992cdcdcad3b686146f9b8e955693a50982dd8aa04f54b2d nginx.conf
0907f69dc2d3dc1bad3a04fb6673f741f1a8be964e22b306ef9ae2f8e736e1f5733a8884bfe54f3553fff5132a0e5336716250f54272c3fec2177d6ba16986f3 default.conf
-f3321a45736697009817db335ad36d3f1d05f60d98ac90a943220cdd4c00c52632f018db6a6076d5431a483525aacc5725b87b765b590e2f63b3ef98c5b16bd8 stream.conf
+426f0c317322af7cab152f2070398c7aa5c059276ba504617a212f1e060bbb1dd9edc54e62d4cf5f14e3678235351c808ebeabe8b122757c74b3f505e8427106 stream.conf
09b110693e3f4377349ccea3c43cb8199c8579ee351eae34283299be99fdf764b0c1bddd552e13e4d671b194501618b29c822e1ad53b34101a73a63954363dbb nginx.logrotate
ee10a5687740dde0c3d18d8b3555f49fcdc6abfc0a3bc2de1de3be0e99951a346fe8027d916aab73071ecd4e2c50871e7c867aca3a7a0fd16e3374c5caed1c57 nginx.initd
0b9b9ed01ac077e334c034faa2679f6e26740fb3362eebf8cef82d22b2af2a3faaa53bae3c9e14af51cbf64720a7c66431905ca5cc43f978366456cc4e3b7f4a nginx.confd
@@ -505,6 +507,7 @@ d6ca250db8de93edbd7875afca35e73cecdaf82132d1a7ee933cf94c6b8afa8e629e9e647a9321f2
1ff4c947538a5bd5f9d6adcd87b37f2702f5cc90e3342bc08359cbe8f290b705a3a2daa3dedfb1df3ce4bc19478c8fcac07081c4a53a804fc2862d50078278dc set-misc-nginx-module-0.33.tar.gz
1730845ea2e52be8c2f6cfceb2894304c5a07959a96940bb1617ee0e7cf81d22283304f411d9a219ddb71e4d9a66012bba0f6f5574d101aeb3c406f26c5d6a4e nginx-http-shibboleth-2.0.1.tar.gz
c3a7dd29c4a4e47d396b19622a290a04d4cceb97c1b8a508bc984eb8c81d17da4bf5789514bb996987f8343bc801ee4457a86a274bde98b49a809afdfc04cbde ngx_http_untar_module-1.1.tar.gz
+a0da355888398f86a6b5d065e58c05f9e057589ee785be9f515d77d7a020ae5a7b0656f5af30fb3b026f457326db2e26f4fed29026221ec5fc8156ef8586da25 nginx-upload-module-2.3.0.tar.gz
c31c46344d49704389722325a041b9cd170fa290acefe92cfc572c07f711cd3039de78f28df48ca7dcb79b2e4bbe442580aaaf4d92883fd3a14bf41d66dd9d8c nginx-upload-progress-module-0.9.2.tar.gz
8adb7453c27748f4e685e3352e9b318b408da818754dc5b6244e908423941a8ba337561104f6e481f2553cbc0e334dcea73b57f8e810a9d6e974bb69ff8859e5 nginx-upstream-fair-0.1.3.tar.gz
bbf3f4808f17fa797fa0c27bc1351098aa5d6b5d227376a0ab01b4f424942ec5ad9f5c09c7af284345988b119268bf579b24065fb6bc6bc2f2b2392e918f09bc ngx_upstream_jdomain-1.4.0.tar.gz
diff --git a/main/nginx/nginx.conf b/main/nginx/nginx.conf
index bc784a3187..919bd593db 100644
--- a/main/nginx/nginx.conf
+++ b/main/nginx/nginx.conf
@@ -14,9 +14,8 @@ error_log /var/log/nginx/error.log warn;
# Includes files with directives to load dynamic modules.
include /etc/nginx/modules/*.conf;
-# Uncomment to include files with config snippets into the root context.
-# NOTE: This will be enabled by default in Alpine 3.15.
-#include /etc/nginx/conf.d/*.conf;
+# Include files with config snippets into the root context.
+include /etc/nginx/conf.d/*.conf;
events {
# The maximum number of simultaneous connections that can be opened by
@@ -102,6 +101,3 @@ http {
# Includes virtual hosts configs.
include /etc/nginx/http.d/*.conf;
}
-
-# TIP: Uncomment if you use stream module.
-#include /etc/nginx/stream.conf;
diff --git a/main/nginx/nginx.post-upgrade b/main/nginx/nginx.post-upgrade
index 58e8e1baed..3062f98223 100644
--- a/main/nginx/nginx.post-upgrade
+++ b/main/nginx/nginx.post-upgrade
@@ -22,38 +22,25 @@ fi
# Handle transition from /etc/nginx/conf.d to /etc/nginx/http.d.
if [ "$(apk version -t "$ver_old" '1.18.0-r13')" = '<' ]; then
- default_conf='/usr/share/nginx/http-default_server.conf'
-
- if [ -z "$(ls -A /etc/nginx/conf.d 2>/dev/null)" ]; then
- # conf.d dir doesn't exist or is empty, so the user doesn't use it.
- # Thus we can install default.conf to the new directory.
- install -m644 "$default_conf" /etc/nginx/http.d/default.conf
-
- else
- if ! [ -e /etc/nginx/conf.d/default.conf ]; then
- # conf.d dir exists and is not empty, but there's no default.conf
- # file, so the user probably did not modify it and apk has removed
- # it during this upgrade. Prior this version, the default.conf
- # would be installed, so install it now for backward compatibility.
- install -m644 "$default_conf" /etc/nginx/conf.d/default.conf
- fi
- if ! [ -e /etc/nginx/nginx.conf.apk-new ]; then
- # There's no updated nginx.conf, so the user didn't modify this
- # config and apk replaced it during this upgrade. However, the
- # user has some vhost configs in the old directory, so we have
- # to revert the include back to the legacy path.
- sed -i 's|include /etc/nginx/http\.d|# WARNING: Do not use this directory for virtual hosts anymore, use directory http.d!\n\tinclude /etc/nginx/conf.d|' \
- /etc/nginx/nginx.conf
- fi
+ if ! [ -e /etc/nginx/http.d/default.conf ]; then
+ install -D -m644 /usr/share/nginx/http-default_server.conf \
+ /etc/nginx/http.d/default.conf
fi
+fi
- cat >&2 <<-EOF
- *
- * The default and preferred location for nginx vhost configs has been changed
- * from /etc/nginx/conf.d to /etc/nginx/http.d. Although we did our best to not
- * break existing setups by this upgrade, we strongly recommend to verify it.
- *
- EOF
+# Handle transition from /etc/nginx/conf.d to /etc/nginx/http.d.
+if [ "$(apk version -t "$ver_old" '1.22.0-r7')" = '<' ]; then
+ if sed -En '/^http\s*\{/,/^\}/{ /^\s*include\s+\/etc\/nginx\/conf.d\/.*;/p }' /etc/nginx/nginx.conf | grep -q .; then
+ cat >&2 <<-EOF
+ !!
+ !! Found 'include /etc/nginx/conf.d/*.conf' in the 'http' section!
+ !! The default and preferred location for nginx http configs has been changed
+ !! from /etc/nginx/conf.d to /etc/nginx/http.d. The former is now used for
+ !! configs to be included in the root context. Move your vhost configs from
+ !! /etc/nginx/conf.d/ to /etc/nginx/http.d/ and update /etc/nginx/nginx.conf.
+ !!
+ EOF
+ fi
fi
# Handle trasition from /var/tmp/nginx to /var/lib/nginx/tmp
diff --git a/main/nginx/stream.conf b/main/nginx/stream.conf
index 2438744549..4b7177de0c 100644
--- a/main/nginx/stream.conf
+++ b/main/nginx/stream.conf
@@ -1,4 +1,4 @@
-# /etc/nginx/stream.conf
+# /etc/nginx/conf.d/stream.conf
stream {
# Specifies the main log format.