Welcome! Log In Create A New Profile

Advanced

error dynamic module nginx 1.10.3 ngx_http_headers_more_filter_module

Posted by kiber 
error dynamic module nginx 1.10.3 ngx_http_headers_more_filter_module
May 07, 2020 03:17PM
Hi all)

add dynamic module nginx 1.10.3 ngx_http_headers_more_filter_module

#nginx -V

nginx version: nginx/1.10.3
built by gcc 4.4.7 20120313 (Red Hat 4.4.7-23) (GCC)
built with OpenSSL 1.0.1e-fips 11 Feb 2013
TLS SNI support enabled
configure arguments: --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/tmp/client_body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi --http-scgi-temp-path=/var/lib/nginx/tmp/scgi --pid-path=/var/run/nginx.pid --lock-path=/var/lock/subsys/nginx --user=nginx --group=nginx --with-file-aio --with-ipv6 --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_addition_module --with-http_xslt_module=dynamic --with-http_image_filter_module=dynamic --with-http_geoip_module=dynamic --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_slice_module --with-http_stub_status_module --with-http_perl_module=dynamic --with-mail=dynamic --with-mail_ssl_module --with-pcre --with-pcre-jit --with-stream=dynamic --with-stream_ssl_module --with-debug --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' --with-ld-opt=' -Wl,-E'


#wget 'http://nginx.org/download/nginx-1.10.3.tar.gz'

#git clone https://github.com/openresty/headers-more-nginx-module.git

>conf module

ngx_addon_name=ngx_http_headers_more_filter_module

HEADERS_MORE_SRCS=" \
$ngx_addon_dir/src/ngx_http_headers_more_filter_module.c \
$ngx_addon_dir/src/ngx_http_headers_more_headers_out.c \
$ngx_addon_dir/src/ngx_http_headers_more_headers_in.c \
$ngx_addon_dir/src/ngx_http_headers_more_util.c \
"

HEADERS_MORE_DEPS=" \
$ngx_addon_dir/src/ddebug.h \
$ngx_addon_dir/src/ngx_http_headers_more_filter_module.h \
$ngx_addon_dir/src/ngx_http_headers_more_headers_in.h \
$ngx_addon_dir/src/ngx_http_headers_more_headers_out.h \
$ngx_addon_dir/src/ngx_http_headers_more_headers_in.h \
$ngx_addon_dir/src/ngx_http_headers_more_util.h \
"

if test -n "$ngx_module_link"; then
ngx_module_type=HTTP_AUX_FILTER
ngx_module_name=$ngx_addon_name
ngx_module_incs=
ngx_module_deps="$HEADERS_MORE_DEPS"
ngx_module_srcs="$HEADERS_MORE_SRCS"
ngx_module_libs=

. auto/module
else
HTTP_AUX_FILTER_MODULES="$HTTP_AUX_FILTER_MODULES $ngx_addon_name"
NGX_ADDON_SRCS="$NGX_ADDON_SRCS $HEADERS_MORE_SRCS"
NGX_ADDON_DEPS="$NGX_ADDON_DEPS $HEADERS_MORE_DEPS"
fi


cd /tmp/nginx-1.10.3/
./configure --prefix=/tmp/nginx-1.10.3 \
--add-dynamic-module=/tmp/headers-more-nginx-module
make modules

>compile

Configuration summary
+ using system PCRE library
+ OpenSSL library is not used
+ using builtin md5 code
+ sha1 library is not found
+ using system zlib library

nginx path prefix: "/tmp/nginx-1.10.3"
nginx binary file: "/tmp/nginx-1.10.3/sbin/nginx"
nginx modules path: "/tmp/nginx-1.10.3/modules"
nginx configuration prefix: "/tmp/nginx-1.10.3/conf"
nginx configuration file: "/tmp/nginx-1.10.3/conf/nginx.conf"
nginx pid file: "/tmp/nginx-1.10.3/logs/nginx.pid"
nginx error log file: "/tmp/nginx-1.10.3/logs/error.log"
nginx http access log file: "/tmp/nginx-1.10.3/logs/access.log"
nginx http client request body temporary files: "client_body_temp"
nginx http proxy temporary files: "proxy_temp"
nginx http fastcgi temporary files: "fastcgi_temp"
nginx http uwsgi temporary files: "uwsgi_temp"
nginx http scgi temporary files: "scgi_temp"

#make modules

make -f objs/Makefile modules
make[1]: Entering directory `/tmp/nginx-1.10.3'
cc -c -fPIC -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/h ttp -I src/http/modules \
-o objs/addon/src/ngx_http_headers_more_filter_module.o \
/tmp/headers-more-nginx-module/src/ngx_http_headers_more_filter_module.c
cc -c -fPIC -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/h ttp -I src/http/modules \
-o objs/addon/src/ngx_http_headers_more_headers_out.o \
/tmp/headers-more-nginx-module/src/ngx_http_headers_more_headers_out.c
cc -c -fPIC -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/h ttp -I src/http/modules \
-o objs/addon/src/ngx_http_headers_more_headers_in.o \
/tmp/headers-more-nginx-module/src/ngx_http_headers_more_headers_in.c
cc -c -fPIC -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/h ttp -I src/http/modules \
-o objs/addon/src/ngx_http_headers_more_util.o \
/tmp/headers-more-nginx-module/src/ngx_http_headers_more_util.c
cc -c -fPIC -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/h ttp -I src/http/modules \
-o objs/ngx_http_headers_more_filter_module_modules.o \
objs/ngx_http_headers_more_filter_module_modules.c
cc -o objs/ngx_http_headers_more_filter_module.so \
objs/addon/src/ngx_http_headers_more_filter_module.o \
objs/addon/src/ngx_http_headers_more_headers_out.o \
objs/addon/src/ngx_http_headers_more_headers_in.o \
objs/addon/src/ngx_http_headers_more_util.o \
objs/ngx_http_headers_more_filter_module_modules.o \
-shared
make[1]: Leaving directory `/tmp/nginx-1.10.3'


add nginx.conf

load_module /ngx_http_headers_more_filter_module.so;

nginx -t

error

nginx: [emerg] module "/usr/lib64/nginx/modules/ngx_http_headers_more_filter_module.so" is not binary compatible in /etc/nginx/nginx.conf:12
nginx: configuration file /etc/nginx/nginx.conf test failed



Edited 1 time(s). Last edit at 05/07/2020 03:18PM by kiber.
Re: error dynamic module nginx 1.10.3 ngx_http_headers_more_filter_module
May 10, 2020 12:07PM
Compile nginx from sources. + --add-module=/headers-more-nginx-module. Well, I've solved that problem.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 133
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready