aboutsummaryrefslogtreecommitdiff
path: root/package/nginx
diff options
context:
space:
mode:
Diffstat (limited to 'package/nginx')
-rw-r--r--package/nginx/Config.in22
-rw-r--r--package/nginx/S50nginx2
-rw-r--r--package/nginx/nginx.hash4
-rw-r--r--package/nginx/nginx.mk27
-rw-r--r--package/nginx/nginx.service13
5 files changed, 51 insertions, 17 deletions
diff --git a/package/nginx/Config.in b/package/nginx/Config.in
index 6dba7e0ead..6ae790a949 100644
--- a/package/nginx/Config.in
+++ b/package/nginx/Config.in
@@ -290,6 +290,12 @@ config BR2_PACKAGE_NGINX_HTTP_UPSTREAM_KEEPALIVE_MODULE
help
Enable ngx_http_upstream_keepalive_module
+config BR2_PACKAGE_NGINX_HTTP_UPSTREAM_RANDOM_MODULE
+ bool "ngx_http_upstream_random_module"
+ default y
+ help
+ Enable ngx_http_upstream_random_module
+
endif #BR2_PACKAGE_NGINX_HTTP
config BR2_PACKAGE_NGINX_MAIL
@@ -328,6 +334,11 @@ config BR2_PACKAGE_NGINX_STREAM
if BR2_PACKAGE_NGINX_STREAM
+config BR2_PACKAGE_NGINX_STREAM_REALIP_MODULE
+ bool "ngx_stream_realip_module"
+ help
+ Enable ngx_stream_realip_module
+
config BR2_PACKAGE_NGINX_STREAM_SSL_MODULE
bool "ngx_stream_ssl_module"
select BR2_PACKAGE_OPENSSL
@@ -340,6 +351,11 @@ config BR2_PACKAGE_NGINX_STREAM_GEOIP_MODULE
help
Enable ngx_stream_geoip_module
+config BR2_PACKAGE_NGINX_STREAM_SSL_PREREAD_MODULE
+ bool "ngx_stream_ssl_preread_module"
+ help
+ Enable ngx_stream_ssl_preread_module
+
config BR2_PACKAGE_NGINX_STREAM_LIMIT_CONN_MODULE
bool "ngx_stream_limit_conn_module"
default y
@@ -388,6 +404,12 @@ config BR2_PACKAGE_NGINX_STREAM_UPSTREAM_LEAST_CONN_MODULE
help
Enable ngx_stream_upstream_least_conn_module
+config BR2_PACKAGE_NGINX_STREAM_UPSTREAM_RANDOM_MODULE
+ bool "ngx_stream_upstream_random_module"
+ default y
+ help
+ Enable ngx_stream_upstream_random_module
+
config BR2_PACKAGE_NGINX_STREAM_UPSTREAM_ZONE_MODULE
bool "ngx_stream_upstream_zone_module"
default y
diff --git a/package/nginx/S50nginx b/package/nginx/S50nginx
index 964652b922..6c243f40b3 100644
--- a/package/nginx/S50nginx
+++ b/package/nginx/S50nginx
@@ -9,7 +9,7 @@ PIDFILE=/var/run/nginx.pid
case "$1" in
start)
echo "Starting nginx..."
- mkdir -p /var/log/nginx /var/tmp/nginx
+ mkdir -p /var/log/nginx /var/cache/nginx
start-stop-daemon -S -x "$NGINX" -p "$PIDFILE"
;;
stop)
diff --git a/package/nginx/nginx.hash b/package/nginx/nginx.hash
index 3ec7ff2444..8d17931a26 100644
--- a/package/nginx/nginx.hash
+++ b/package/nginx/nginx.hash
@@ -1,4 +1,4 @@
# Locally calculated after checking pgp signature
-sha256 7dd65d405c753c41b7fdab9415cfb4bdbaf093ec6d9f7432072d52cb7bcbb689 nginx-1.17.9.tar.gz
+sha256 4c373e7ab5bf91d34a4f11a0c9496561061ba5eee6020db272a17a7228d35f99 nginx-1.18.0.tar.gz
# License files, locally calculated
-sha256 28ad30e2f64bd89ac1287b4606906bb99ed04d9f4e13fb6564a0be9c8a23f509 LICENSE
+sha256 28ad30e2f64bd89ac1287b4606906bb99ed04d9f4e13fb6564a0be9c8a23f509 LICENSE
diff --git a/package/nginx/nginx.mk b/package/nginx/nginx.mk
index 6b0b318247..9c32546835 100644
--- a/package/nginx/nginx.mk
+++ b/package/nginx/nginx.mk
@@ -4,10 +4,11 @@
#
################################################################################
-NGINX_VERSION = 1.17.9
+NGINX_VERSION = 1.18.0
NGINX_SITE = http://nginx.org/download
NGINX_LICENSE = BSD-2-Clause
NGINX_LICENSE_FILES = LICENSE
+NGINX_CPE_ID_VENDOR = nginx
NGINX_DEPENDENCIES = host-pkgconf
NGINX_CONF_OPTS = \
@@ -49,17 +50,17 @@ NGINX_CONF_OPTS += \
--prefix=/usr \
--conf-path=/etc/nginx/nginx.conf \
--sbin-path=/usr/sbin/nginx \
- --pid-path=/var/run/nginx.pid \
- --lock-path=/var/run/lock/nginx.lock \
+ --pid-path=/run/nginx.pid \
+ --lock-path=/run/lock/nginx.lock \
--user=www-data \
--group=www-data \
--error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.log \
- --http-client-body-temp-path=/var/tmp/nginx/client-body \
- --http-proxy-temp-path=/var/tmp/nginx/proxy \
- --http-fastcgi-temp-path=/var/tmp/nginx/fastcgi \
- --http-scgi-temp-path=/var/tmp/nginx/scgi \
- --http-uwsgi-temp-path=/var/tmp/nginx/uwsgi
+ --http-client-body-temp-path=/var/cache/nginx/client-body \
+ --http-proxy-temp-path=/var/cache/nginx/proxy \
+ --http-fastcgi-temp-path=/var/cache/nginx/fastcgi \
+ --http-scgi-temp-path=/var/cache/nginx/scgi \
+ --http-uwsgi-temp-path=/var/cache/nginx/uwsgi
NGINX_CONF_OPTS += \
$(if $(BR2_PACKAGE_NGINX_FILE_AIO),--with-file-aio) \
@@ -198,6 +199,7 @@ NGINX_CONF_OPTS += \
$(if $(BR2_PACKAGE_NGINX_HTTP_BROWSER_MODULE),,--without-http_browser_module) \
$(if $(BR2_PACKAGE_NGINX_HTTP_UPSTREAM_IP_HASH_MODULE),,--without-http_upstream_ip_hash_module) \
$(if $(BR2_PACKAGE_NGINX_HTTP_UPSTREAM_LEAST_CONN_MODULE),,--without-http_upstream_least_conn_module) \
+ $(if $(BR2_PACKAGE_NGINX_HTTP_UPSTREAM_RANDOM_MODULE),,--without-http_upstream_random_module) \
$(if $(BR2_PACKAGE_NGINX_HTTP_UPSTREAM_KEEPALIVE_MODULE),,--without-http_upstream_keepalive_module)
else # !BR2_PACKAGE_NGINX_HTTP
@@ -224,6 +226,10 @@ endif # BR2_PACKAGE_NGINX_MAIL
ifeq ($(BR2_PACKAGE_NGINX_STREAM),y)
NGINX_CONF_OPTS += --with-stream
+ifeq ($(BR2_PACKAGE_NGINX_STREAM_REALIP_MODULE),y)
+NGINX_CONF_OPTS += --with-stream_realip_module
+endif
+
ifeq ($(BR2_PACKAGE_NGINX_STREAM_SSL_MODULE),y)
NGINX_DEPENDENCIES += openssl
NGINX_CONF_OPTS += --with-stream_ssl_module
@@ -234,6 +240,10 @@ NGINX_DEPENDENCIES += geoip
NGINX_CONF_OPTS += --with-stream_geoip_module
endif
+ifeq ($(BR2_PACKAGE_NGINX_STREAM_SSL_PREREAD_MODULE),y)
+NGINX_CONF_OPTS += --with-stream_ssl_preread_module
+endif
+
NGINX_CONF_OPTS += \
$(if $(BR2_PACKAGE_NGINX_STREAM_LIMIT_CONN_MODULE),,--without-stream_limit_conn_module) \
$(if $(BR2_PACKAGE_NGINX_STREAM_ACCESS_MODULE),,--without-stream_access_module) \
@@ -243,6 +253,7 @@ NGINX_CONF_OPTS += \
$(if $(BR2_PACKAGE_NGINX_STREAM_RETURN_MODULE),,--without-stream_return_module) \
$(if $(BR2_PACKAGE_NGINX_STREAM_UPSTREAM_HASH_MODULE),,--without-stream_upstream_hash_module) \
$(if $(BR2_PACKAGE_NGINX_STREAM_UPSTREAM_LEAST_CONN_MODULE),,--without-stream_upstream_least_conn_module) \
+ $(if $(BR2_PACKAGE_NGINX_STREAM_UPSTREAM_RANDOM_MODULE),,--without-stream_upstream_random_module) \
$(if $(BR2_PACKAGE_NGINX_STREAM_UPSTREAM_ZONE_MODULE),,--without-stream_upstream_zone_module)
endif # BR2_PACKAGE_NGINX_STREAM
diff --git a/package/nginx/nginx.service b/package/nginx/nginx.service
index 320df9a80e..11ccd62237 100644
--- a/package/nginx/nginx.service
+++ b/package/nginx/nginx.service
@@ -4,12 +4,13 @@ After=syslog.target network.target
[Service]
Type=forking
-PIDFile=/var/run/nginx.pid
-ExecStartPre=/usr/bin/mkdir -p /var/log/nginx /var/tmp/nginx
-ExecStartPre=/usr/sbin/nginx -t -q -g 'pid /var/run/nginx.pid; daemon on; master_process on;'
-ExecStart=/usr/sbin/nginx -g 'pid /var/run/nginx.pid; daemon on; master_process on;'
-ExecReload=/usr/sbin/nginx -g 'pid /var/run/nginx.pid; daemon on; master_process on;' -s reload
-ExecStop=/usr/sbin/nginx -g 'pid /var/run/nginx.pid;' -s quit
+LogsDirectory=nginx
+CacheDirectory=nginx
+PIDFile=/run/nginx.pid
+ExecStartPre=/usr/sbin/nginx -t -q -g 'daemon on; master_process on;'
+ExecStart=/usr/sbin/nginx -g 'daemon on; master_process on;'
+ExecReload=/usr/sbin/nginx -g 'daemon on; master_process on;' -s reload
+ExecStop=/usr/sbin/nginx -s quit
PrivateDevices=yes
[Install]