nginx: correct f3c7cc6
authorDirk Feytons <dirk.feytons@gmail.com>
Mon, 9 May 2016 16:09:41 +0000 (18:09 +0200)
committerZoltan HERPAI <wigyori@uid0.hu>
Sun, 12 Nov 2017 18:15:07 +0000 (19:15 +0100)
Signed-off-by: Dirk Feytons <dirk.feytons@gmail.com>
net/nginx/Config.in
net/nginx/Makefile
net/nginx/patches-lua-nginx/100-dont_export_symbols.patch [deleted file]
net/nginx/patches-lua-nginx/100-no_by_lua_block.patch [new file with mode: 0644]
net/nginx/patches-lua-nginx/101-no_by_lua_block.patch [deleted file]

index 349f6931533ae53f8e50be864e7e6d59a29b59a4..bf6b834c2989a0fa48e38250eb7923bc70aeebf6 100644 (file)
@@ -177,7 +177,7 @@ config NGINX_NAXSI
        prompt "Enable NAXSI module"
        default y
 
-config NGINX_MODULE_LUA
+config NGINX_LUA
        bool
        prompt "Enable Lua module"
        default n
index c4e9f0b56f2135936fdba9872a0076258f9b83c1..af07476366145ae08ef44b7c4118570652c37133 100644 (file)
@@ -56,7 +56,7 @@ PKG_CONFIG_DEPENDS := \
        CONFIG_NGINX_HTTP_CACHE \
        CONFIG_NGINX_PCRE \
        CONFIG_NGINX_NAXSI \
-       CONFIG_NGINX_MODULE_LUA
+       CONFIG_NGINX_LUA
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -66,7 +66,7 @@ define Package/nginx
   SUBMENU:=Web Servers/Proxies
   TITLE:=Nginx web server
   URL:=http://nginx.org/
-  DEPENDS:=+NGINX_PCRE:libpcre +(NGINX_SSL||NGINX_HTTP_CACHE||NGINX_HTTP_AUTH_BASIC):libopenssl +NGINX_HTTP_GZIP:zlib +NGINX_MODULE_LUA:liblua +libpthread
+  DEPENDS:=+NGINX_PCRE:libpcre +(NGINX_SSL||NGINX_HTTP_CACHE||NGINX_HTTP_AUTH_BASIC):libopenssl +NGINX_HTTP_GZIP:zlib +NGINX_LUA:liblua +libpthread
   MENU:=1
 endef
 
@@ -192,12 +192,6 @@ endif
 ifneq ($(CONFIG_NGINX_HTTP_UPSTREAM_KEEPALIVE),y)
   ADDITIONAL_MODULES += --without-http_upstream_keepalive_module
 endif
-ifeq ($(CONFIG_NGINX_MODULE_LUA),y)
-  ADDITIONAL_MODULES += --add-module=$(PKG_BUILD_DIR)/lua-nginx
-endif
-
-TARGET_CFLAGS += -ffunction-sections -fdata-sections -DNGX_LUA_NO_BY_LUA_BLOCK
-TARGET_LDFLAGS += -Wl,--gc-sections
 
 TARGET_CFLAGS += -fvisibility=hidden -ffunction-sections -fdata-sections -DNGX_LUA_NO_BY_LUA_BLOCK
 TARGET_LDFLAGS += -Wl,--gc-sections
@@ -259,31 +253,11 @@ define  Prepare/nginx-naxsi
        gzip -dc $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
 endef
 
-define Download/lua-nginx
-       VERSION:=df5bf1d6242eb5c11adf0dccb8e830dc6672e14b
-       SUBDIR:=lua-nginx
-       FILE:=lua-nginx-module-$(PKG_VERSION)-$$(VERSION).tar.gz
-       URL:=https://github.com/openresty/lua-nginx-module.git
-       PROTO:=git
-endef
-
-define  Prepare/lua-nginx
-       $(eval $(call Download,lua-nginx))
-       gzip -dc $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
-       $(call PatchDir,$(PKG_BUILD_DIR),./patches-lua-nginx)
-endef
-
-define Build/Prepare
-       $(call Build/Prepare/Default)
-       $(if $(CONFIG_NGINX_NAXSI),$(call Prepare/nginx-naxsi))
-       $(if $(CONFIG_NGINX_MODULE_LUA),$(call Prepare/lua-nginx))
-endef
-
 define Download/lua-nginx
        VERSION:=1967998b0eedab1ff51bff8fafa5fc3db47976aa
        SUBDIR:=lua-nginx
        FILE:=lua-nginx-module-$(PKG_VERSION)-$$(VERSION).tar.gz
-       URL:=git://github.com/openresty/lua-nginx-module.git
+       URL:=https://github.com/openresty/lua-nginx-module.git
        PROTO:=git
 endef
 
diff --git a/net/nginx/patches-lua-nginx/100-dont_export_symbols.patch b/net/nginx/patches-lua-nginx/100-dont_export_symbols.patch
deleted file mode 100644 (file)
index 8011069..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
---- a/lua-nginx/config
-+++ b/lua-nginx/config
-@@ -409,35 +409,35 @@ NGX_ADDON_DEPS="$NGX_ADDON_DEPS \
- CFLAGS="$CFLAGS -DNDK_SET_VAR"
--ngx_feature="export symbols by default (-E)"
--ngx_feature_libs="-Wl,-E"
--ngx_feature_name=
--ngx_feature_run=no
--ngx_feature_incs="#include <stdio.h>"
--ngx_feature_path=
--ngx_feature_test='printf("hello");'
--
--. auto/feature
--
--if [ $ngx_found = yes ]; then
--    CORE_LIBS="-Wl,-E $CORE_LIBS"
--fi
-+#ngx_feature="export symbols by default (-E)"
-+#ngx_feature_libs="-Wl,-E"
-+#ngx_feature_name=
-+#ngx_feature_run=no
-+#ngx_feature_incs="#include <stdio.h>"
-+#ngx_feature_path=
-+#ngx_feature_test='printf("hello");'
-+#
-+#. auto/feature
-+#
-+#if [ $ngx_found = yes ]; then
-+#    CORE_LIBS="-Wl,-E $CORE_LIBS"
-+#fi
- # for Cygwin
--ngx_feature="export symbols by default (--export-all-symbols)"
--ngx_feature_libs="-Wl,--export-all-symbols"
--ngx_feature_name=
--ngx_feature_run=no
--ngx_feature_incs="#include <stdio.h>"
--ngx_feature_path=
--ngx_feature_test='printf("hello");'
--
--. auto/feature
--
--if [ $ngx_found = yes ]; then
--    CORE_LIBS="-Wl,--export-all-symbols $CORE_LIBS"
--fi
--
-+#ngx_feature="export symbols by default (--export-all-symbols)"
-+#ngx_feature_libs="-Wl,--export-all-symbols"
-+#ngx_feature_name=
-+#ngx_feature_run=no
-+#ngx_feature_incs="#include <stdio.h>"
-+#ngx_feature_path=
-+#ngx_feature_test='printf("hello");'
-+#
-+#. auto/feature
-+#
-+#if [ $ngx_found = yes ]; then
-+#    CORE_LIBS="-Wl,--export-all-symbols $CORE_LIBS"
-+#fi
-+#
- NGX_DTRACE_PROVIDERS="$NGX_DTRACE_PROVIDERS $ngx_addon_dir/dtrace/ngx_lua_provider.d"
- NGX_TAPSET_SRCS="$NGX_TAPSET_SRCS $ngx_addon_dir/tapset/ngx_lua.stp"
diff --git a/net/nginx/patches-lua-nginx/100-no_by_lua_block.patch b/net/nginx/patches-lua-nginx/100-no_by_lua_block.patch
new file mode 100644 (file)
index 0000000..fef983f
--- /dev/null
@@ -0,0 +1,195 @@
+--- a/lua-nginx/src/ngx_http_lua_module.c
++++ b/lua-nginx/src/ngx_http_lua_module.c
+@@ -157,14 +157,14 @@ static ngx_command_t ngx_http_lua_cmds[]
+       NGX_HTTP_LOC_CONF_OFFSET,
+       offsetof(ngx_http_lua_loc_conf_t, log_socket_errors),
+       NULL },
+-
++#ifndef NGX_LUA_NO_BY_LUA_BLOCK
+     { ngx_string("init_by_lua_block"),
+       NGX_HTTP_MAIN_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS,
+       ngx_http_lua_init_by_lua_block,
+       NGX_HTTP_MAIN_CONF_OFFSET,
+       0,
+       (void *) ngx_http_lua_init_by_inline },
+-
++#endif
+     { ngx_string("init_by_lua"),
+       NGX_HTTP_MAIN_CONF|NGX_CONF_TAKE1,
+       ngx_http_lua_init_by_lua,
+@@ -178,14 +178,14 @@ static ngx_command_t ngx_http_lua_cmds[]
+       NGX_HTTP_MAIN_CONF_OFFSET,
+       0,
+       (void *) ngx_http_lua_init_by_file },
+-
++#ifndef NGX_LUA_NO_BY_LUA_BLOCK
+     { ngx_string("init_worker_by_lua_block"),
+       NGX_HTTP_MAIN_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS,
+       ngx_http_lua_init_worker_by_lua_block,
+       NGX_HTTP_MAIN_CONF_OFFSET,
+       0,
+       (void *) ngx_http_lua_init_worker_by_inline },
+-
++#endif
+     { ngx_string("init_worker_by_lua"),
+       NGX_HTTP_MAIN_CONF|NGX_CONF_TAKE1,
+       ngx_http_lua_init_worker_by_lua,
+@@ -201,6 +201,7 @@ static ngx_command_t ngx_http_lua_cmds[]
+       (void *) ngx_http_lua_init_worker_by_file },
+ #if defined(NDK) && NDK
++#ifndef NGX_LUA_NO_BY_LUA_BLOCK
+     /* set_by_lua $res { inline Lua code } [$arg1 [$arg2 [...]]] */
+     { ngx_string("set_by_lua_block"),
+       NGX_HTTP_SRV_CONF|NGX_HTTP_SIF_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
+@@ -209,7 +210,7 @@ static ngx_command_t ngx_http_lua_cmds[]
+       NGX_HTTP_LOC_CONF_OFFSET,
+       0,
+       (void *) ngx_http_lua_filter_set_by_lua_inline },
+-
++#endif
+     /* set_by_lua $res <inline script> [$arg1 [$arg2 [...]]] */
+     { ngx_string("set_by_lua"),
+       NGX_HTTP_SRV_CONF|NGX_HTTP_SIF_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
+@@ -237,7 +238,7 @@ static ngx_command_t ngx_http_lua_cmds[]
+       NGX_HTTP_LOC_CONF_OFFSET,
+       0,
+       (void *) ngx_http_lua_rewrite_handler_inline },
+-
++#ifndef NGX_LUA_NO_BY_LUA_BLOCK
+     /* rewrite_by_lua_block { <inline script> } */
+     { ngx_string("rewrite_by_lua_block"),
+       NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
+@@ -246,7 +247,7 @@ static ngx_command_t ngx_http_lua_cmds[]
+       NGX_HTTP_LOC_CONF_OFFSET,
+       0,
+       (void *) ngx_http_lua_rewrite_handler_inline },
+-
++#endif
+     /* access_by_lua "<inline script>" */
+     { ngx_string("access_by_lua"),
+       NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
+@@ -255,7 +256,7 @@ static ngx_command_t ngx_http_lua_cmds[]
+       NGX_HTTP_LOC_CONF_OFFSET,
+       0,
+       (void *) ngx_http_lua_access_handler_inline },
+-
++#ifndef NGX_LUA_NO_BY_LUA_BLOCK
+     /* access_by_lua_block { <inline script> } */
+     { ngx_string("access_by_lua_block"),
+       NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
+@@ -264,7 +265,7 @@ static ngx_command_t ngx_http_lua_cmds[]
+       NGX_HTTP_LOC_CONF_OFFSET,
+       0,
+       (void *) ngx_http_lua_access_handler_inline },
+-
++#endif
+     /* content_by_lua "<inline script>" */
+     { ngx_string("content_by_lua"),
+       NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF|NGX_CONF_TAKE1,
+@@ -272,7 +273,7 @@ static ngx_command_t ngx_http_lua_cmds[]
+       NGX_HTTP_LOC_CONF_OFFSET,
+       0,
+       (void *) ngx_http_lua_content_handler_inline },
+-
++#ifndef NGX_LUA_NO_BY_LUA_BLOCK
+     /* content_by_lua_block { <inline script> } */
+     { ngx_string("content_by_lua_block"),
+       NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS,
+@@ -280,7 +281,7 @@ static ngx_command_t ngx_http_lua_cmds[]
+       NGX_HTTP_LOC_CONF_OFFSET,
+       0,
+       (void *) ngx_http_lua_content_handler_inline },
+-
++#endif
+     /* log_by_lua <inline script> */
+     { ngx_string("log_by_lua"),
+       NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
+@@ -289,7 +290,7 @@ static ngx_command_t ngx_http_lua_cmds[]
+       NGX_HTTP_LOC_CONF_OFFSET,
+       0,
+       (void *) ngx_http_lua_log_handler_inline },
+-
++#ifndef NGX_LUA_NO_BY_LUA_BLOCK
+     /* log_by_lua_block { <inline script> } */
+     { ngx_string("log_by_lua_block"),
+       NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
+@@ -298,7 +299,7 @@ static ngx_command_t ngx_http_lua_cmds[]
+       NGX_HTTP_LOC_CONF_OFFSET,
+       0,
+       (void *) ngx_http_lua_log_handler_inline },
+-
++#endif
+     { ngx_string("rewrite_by_lua_file"),
+       NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
+                         |NGX_CONF_TAKE1,
+@@ -353,7 +354,7 @@ static ngx_command_t ngx_http_lua_cmds[]
+       NGX_HTTP_LOC_CONF_OFFSET,
+       0,
+       (void *) ngx_http_lua_header_filter_inline },
+-
++#ifndef NGX_LUA_NO_BY_LUA_BLOCK
+     /* header_filter_by_lua_block { <inline script> } */
+     { ngx_string("header_filter_by_lua_block"),
+       NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
+@@ -362,7 +363,7 @@ static ngx_command_t ngx_http_lua_cmds[]
+       NGX_HTTP_LOC_CONF_OFFSET,
+       0,
+       (void *) ngx_http_lua_header_filter_inline },
+-
++#endif
+     { ngx_string("header_filter_by_lua_file"),
+       NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
+                         |NGX_CONF_TAKE1,
+@@ -378,7 +379,7 @@ static ngx_command_t ngx_http_lua_cmds[]
+       NGX_HTTP_LOC_CONF_OFFSET,
+       0,
+       (void *) ngx_http_lua_body_filter_inline },
+-
++#ifndef NGX_LUA_NO_BY_LUA_BLOCK
+     /* body_filter_by_lua_block { <inline script> } */
+     { ngx_string("body_filter_by_lua_block"),
+       NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
+@@ -387,7 +388,7 @@ static ngx_command_t ngx_http_lua_cmds[]
+       NGX_HTTP_LOC_CONF_OFFSET,
+       0,
+       (void *) ngx_http_lua_body_filter_inline },
+-
++#endif
+     { ngx_string("body_filter_by_lua_file"),
+       NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
+                         |NGX_CONF_TAKE1,
+@@ -395,14 +396,14 @@ static ngx_command_t ngx_http_lua_cmds[]
+       NGX_HTTP_LOC_CONF_OFFSET,
+       0,
+       (void *) ngx_http_lua_body_filter_file },
+-
++#ifndef NGX_LUA_NO_BY_LUA_BLOCK
+     { ngx_string("balancer_by_lua_block"),
+       NGX_HTTP_UPS_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS,
+       ngx_http_lua_balancer_by_lua_block,
+       NGX_HTTP_SRV_CONF_OFFSET,
+       0,
+       (void *) ngx_http_lua_balancer_handler_inline },
+-
++#endif
+     { ngx_string("balancer_by_lua_file"),
+       NGX_HTTP_UPS_CONF|NGX_CONF_TAKE1,
+       ngx_http_lua_balancer_by_lua,
+@@ -509,14 +510,14 @@ static ngx_command_t ngx_http_lua_cmds[]
+       NGX_HTTP_LOC_CONF_OFFSET,
+       offsetof(ngx_http_lua_loc_conf_t, ssl_ciphers),
+       NULL },
+-
++#ifndef NGX_LUA_NO_BY_LUA_BLOCK
+     { ngx_string("ssl_certificate_by_lua_block"),
+       NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS,
+       ngx_http_lua_ssl_cert_by_lua_block,
+       NGX_HTTP_SRV_CONF_OFFSET,
+       0,
+       (void *) ngx_http_lua_ssl_cert_handler_inline },
+-
++#endif
+     { ngx_string("ssl_certificate_by_lua_file"),
+       NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1,
+       ngx_http_lua_ssl_cert_by_lua,
diff --git a/net/nginx/patches-lua-nginx/101-no_by_lua_block.patch b/net/nginx/patches-lua-nginx/101-no_by_lua_block.patch
deleted file mode 100644 (file)
index 72d0d91..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
---- a/lua-nginx/src/ngx_http_lua_module.c
-+++ b/lua-nginx/src/ngx_http_lua_module.c
-@@ -148,14 +148,14 @@ static ngx_command_t ngx_http_lua_cmds[]
-       NGX_HTTP_LOC_CONF_OFFSET,
-       offsetof(ngx_http_lua_loc_conf_t, log_socket_errors),
-       NULL },
--
-+#ifndef NGX_LUA_NO_BY_LUA_BLOCK
-     { ngx_string("init_by_lua_block"),
-       NGX_HTTP_MAIN_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS,
-       ngx_http_lua_init_by_lua_block,
-       NGX_HTTP_MAIN_CONF_OFFSET,
-       0,
-       (void *) ngx_http_lua_init_by_inline },
--
-+#endif
-     { ngx_string("init_by_lua"),
-       NGX_HTTP_MAIN_CONF|NGX_CONF_TAKE1,
-       ngx_http_lua_init_by_lua,
-@@ -169,14 +169,14 @@ static ngx_command_t ngx_http_lua_cmds[]
-       NGX_HTTP_MAIN_CONF_OFFSET,
-       0,
-       (void *) ngx_http_lua_init_by_file },
--
-+#ifndef NGX_LUA_NO_BY_LUA_BLOCK
-     { ngx_string("init_worker_by_lua_block"),
-       NGX_HTTP_MAIN_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS,
-       ngx_http_lua_init_worker_by_lua_block,
-       NGX_HTTP_MAIN_CONF_OFFSET,
-       0,
-       (void *) ngx_http_lua_init_worker_by_inline },
--
-+#endif
-     { ngx_string("init_worker_by_lua"),
-       NGX_HTTP_MAIN_CONF|NGX_CONF_TAKE1,
-       ngx_http_lua_init_worker_by_lua,
-@@ -228,7 +228,7 @@ static ngx_command_t ngx_http_lua_cmds[]
-       NGX_HTTP_LOC_CONF_OFFSET,
-       0,
-       (void *) ngx_http_lua_rewrite_handler_inline },
--
-+#ifndef NGX_LUA_NO_BY_LUA_BLOCK
-     /* rewrite_by_lua_block { <inline script> } */
-     { ngx_string("rewrite_by_lua_block"),
-       NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
-@@ -237,7 +237,7 @@ static ngx_command_t ngx_http_lua_cmds[]
-       NGX_HTTP_LOC_CONF_OFFSET,
-       0,
-       (void *) ngx_http_lua_rewrite_handler_inline },
--
-+#endif
-     /* access_by_lua "<inline script>" */
-     { ngx_string("access_by_lua"),
-       NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
-@@ -246,7 +246,7 @@ static ngx_command_t ngx_http_lua_cmds[]
-       NGX_HTTP_LOC_CONF_OFFSET,
-       0,
-       (void *) ngx_http_lua_access_handler_inline },
--
-+#ifndef NGX_LUA_NO_BY_LUA_BLOCK
-     /* access_by_lua_block { <inline script> } */
-     { ngx_string("access_by_lua_block"),
-       NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
-@@ -255,7 +255,7 @@ static ngx_command_t ngx_http_lua_cmds[]
-       NGX_HTTP_LOC_CONF_OFFSET,
-       0,
-       (void *) ngx_http_lua_access_handler_inline },
--
-+#endif
-     /* content_by_lua "<inline script>" */
-     { ngx_string("content_by_lua"),
-       NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF|NGX_CONF_TAKE1,
-@@ -263,7 +263,7 @@ static ngx_command_t ngx_http_lua_cmds[]
-       NGX_HTTP_LOC_CONF_OFFSET,
-       0,
-       (void *) ngx_http_lua_content_handler_inline },
--
-+#ifndef NGX_LUA_NO_BY_LUA_BLOCK
-     /* content_by_lua_block { <inline script> } */
-     { ngx_string("content_by_lua_block"),
-       NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS,
-@@ -271,7 +271,7 @@ static ngx_command_t ngx_http_lua_cmds[]
-       NGX_HTTP_LOC_CONF_OFFSET,
-       0,
-       (void *) ngx_http_lua_content_handler_inline },
--
-+#endif
-     /* log_by_lua <inline script> */
-     { ngx_string("log_by_lua"),
-       NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
-@@ -280,7 +280,7 @@ static ngx_command_t ngx_http_lua_cmds[]
-       NGX_HTTP_LOC_CONF_OFFSET,
-       0,
-       (void *) ngx_http_lua_log_handler_inline },
--
-+#ifndef NGX_LUA_NO_BY_LUA_BLOCK
-     /* log_by_lua_block { <inline script> } */
-     { ngx_string("log_by_lua_block"),
-       NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
-@@ -289,7 +289,7 @@ static ngx_command_t ngx_http_lua_cmds[]
-       NGX_HTTP_LOC_CONF_OFFSET,
-       0,
-       (void *) ngx_http_lua_log_handler_inline },
--
-+#endif
-     { ngx_string("rewrite_by_lua_file"),
-       NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
-                         |NGX_CONF_TAKE1,
-@@ -337,7 +337,7 @@ static ngx_command_t ngx_http_lua_cmds[]
-       NGX_HTTP_LOC_CONF_OFFSET,
-       0,
-       (void *) ngx_http_lua_header_filter_inline },
--
-+#ifndef NGX_LUA_NO_BY_LUA_BLOCK
-     /* header_filter_by_lua_block { <inline script> } */
-     { ngx_string("header_filter_by_lua_block"),
-       NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
-@@ -346,7 +346,7 @@ static ngx_command_t ngx_http_lua_cmds[]
-       NGX_HTTP_LOC_CONF_OFFSET,
-       0,
-       (void *) ngx_http_lua_header_filter_inline },
--
-+#endif
-     { ngx_string("header_filter_by_lua_file"),
-       NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
-                         |NGX_CONF_TAKE1,
-@@ -362,7 +362,7 @@ static ngx_command_t ngx_http_lua_cmds[]
-       NGX_HTTP_LOC_CONF_OFFSET,
-       0,
-       (void *) ngx_http_lua_body_filter_inline },
--
-+#ifndef NGX_LUA_NO_BY_LUA_BLOCK
-     /* body_filter_by_lua_block { <inline script> } */
-     { ngx_string("body_filter_by_lua_block"),
-       NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
-@@ -371,7 +371,7 @@ static ngx_command_t ngx_http_lua_cmds[]
-       NGX_HTTP_LOC_CONF_OFFSET,
-       0,
-       (void *) ngx_http_lua_body_filter_inline },
--
-+#endif
-     { ngx_string("body_filter_by_lua_file"),
-       NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
-                         |NGX_CONF_TAKE1,