emiller nginx modules guide

Todd Fisher todd.fisher at gmail.com
Wed Jun 11 22:56:30 MSD 2008


Hi,

  I've just started working on a new nginx filter module... Not sure
if I'll get it finished, but did notice an issue in the emiller guide,
here: http://emiller.info/nginx-modules-guide.html#compiling

The issue is simple, but not obvious at first.  The guide provides an
example addon configuration:

ngx_addon_name=ngx_http_<your module>_module
HTTP_MODULES="$HTTP_MODULES ngx_http_<your module>_module"
NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_<your module>_module.c"


But, if you're creating a filter module, this will load the addon
filter too early and it's filter methods will never get called.  It
needs to be

ngx_addon_name=ngx_http_<your module>_module
HTTP_FILTER_MODULES="$HTTP_FILTER_MODULES ngx_http_<your module>_module"
NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_<your module>_module.c"


Hope, this is useful to anyone else writing a filter module, thanks
and hopefully this is the right list for this post.

Thanks,
-Todd





More information about the nginx mailing list