Building nginx modules

I have tried to build an nginx module as a dynamic module (ngx-fancyindex). It wasn’t clear which nginx version Clear Linux ships with, so I used the latest sources to build the module against. Unfortunately when I try to load it, it fails due to a binary incompatibility error.

[emerg] 5055#5055: module "/usr/lib64/nginx/ngx_http_fancyindex_module.so" is not binary compatible in /etc/nginx/nginx.conf:2

I just added this module to nginx-mainline-extras. It will be available in an update in 1-2 working days. To use it, you have to make your nginx configuration in /etc/nginx-mainline instead of /etc/nginx - since nginx-mainline has a separate config prefix.

Building nginx modules is somewhat complex because the upstream project admins have rejected to accommodate out-of-tree module builds. If you want to build your own modules, you’ll need to leverage this project or compile nginx entirely yourself: nginx-mainline/0003-Add-nginx-module-build-install-script.patch at f9ca747ed67b5eddab5d24da0e426def9b183187 · clearlinux-pkgs/nginx-mainline · GitHub - we also need to make a special dev bundle to make this easy for users, this still needs to be done.

1 Like

Wow thanks for the fast response. I have installed nginx-mainline and renamed my configuration directory, the module isn’t there yet but I will try it out as soon as it appears.

Just to let you know, the fancyindex module is now working fine for me and I’ve configured a nice mobile-friendly theme with a bit of CSS. Nice :slight_smile:

1 Like