2

So I'm trying to setup the dynamic module fancyindex on Nginx and have run into a problem I can't seem to get around. I downloaded my corresponding Nginx from their official downloads section, 1.12.2, then downloaded fancyindex from github, unpacked them and ran from inside /nginx-1.12.2/

./configure --with-compat --add-dynamic-module=../ngx-fancyindex

then appended the newly made "ngx_http_fancyindex_module.so" file into /etc/nginx/modules/ and fixed my nginx.conf file to be as follows

#user nobody nobody;
user http http;
worker_processes auto;
error_log  /var/log/nginx/error.log;
load_module /etc/nginx/modules/ngx_http_fancyindex_module.so;

The section of my sites specific config file that includes fancyindex is as follows

location /images/ {
            alias /var/www/test/public/images/;
            fancyindex on;
            fancyindex_default_sort name;
            fancyindex_exact_size on;
    }

Now the problem I'm running into is that if I run "nginx -t" I am met with the error :

nginx: [emerg] module "/etc/nginx/modules/ngx_http_fancyindex_module.so" is not binary compatible in /usr/local/nginx/conf/nginx.conf:11

I checked again with 'nginx -V' and have definitely used the correct nginx version, 1.12.2 and also am sure that I did not compile nginx with any configure arguments so that shouldn't be causing this error, at least I think. Any thoughts would be appreciated.

Bencc
  • 53
  • 3
  • 6
  • Nginx itself should also be compiled with `--with-compat` option. So, you have to recompile it too. – Alexey Ten Nov 29 '17 at 09:53
  • Alright, thanks. Could I just compile the dynamic module without "--with-compat" or do I need to recompile nginx with that configuration? – Bencc Nov 29 '17 at 19:52
  • Recompiled with '--with-compat' and all is working now. – Bencc Nov 29 '17 at 20:27

0 Answers0