error while building own nginx module

Pankaj Chaudhary pankajitbhu at gmail.com
Wed Jul 20 14:12:58 UTC 2016


Hi

i have written  own nginx module and i have many header ,src and makefiles
files .

 my nginx module folder structure look like below

/product/src/nginx/ngx_http_auth_module.cpp
/product/src/nginx/Makefile
/product/src/nginx/config(nginx config file)
/product/src/common/.cpp files
/product/lib/.so files
/product/src/utility/.c and .h files

i have written my config file like this
***************************************************************
ngx_module_type=HTTP_AUX_FILTER_MODULES
ngx_module_name=ngx_http_auth_module
ngx_module_incs=$ngx_addon_dir
ngx_module_deps=
ngx_module_srcs=$ngx_addon_dir/ngx_http_auth_module.cpp \
                $ngx_addon_dir/Makefile

ngx_module_libs=

. auto/module
***************************************************************************
code  build  successfully and generated  ngx_http_auth_module.so file but
not correctly since i am getting below  error while loading in nginx.conf
file.

nginx: [emerg] dlopen() "/usr/local/nginx/modules/ngx_http_auth_module.so"
failed (/usr/local/nginx/modules/ngx_http_auth_module.so: undefined symbol:
ngx_http_auth_module

Please let me know correct way to do.

Thanks & Regards,
Pankaj Chaudhary
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20160720/e2ef4f83/attachment.html>


More information about the nginx-devel mailing list