Learn about Centmin Mod LEMP Stack today
Register Now

Nginx fancyindex nginx module customisation

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by BobbyWibowo, Jun 19, 2016.

  1. BobbyWibowo

    BobbyWibowo Active Member

    197
    42
    28
    Jul 30, 2015
    Indonesia
    Ratings:
    +71
    Local Time:
    8:27 PM
    1.17.x
    10.3.x
    @eva2000 By the way, I installed this fancyindex theme: GitHub - TheInsomniac/Nginx-Fancyindex-Theme: Theme for Nginx' fancyindex module and it's working properly. But it recommended that I change NGX_HTTP_FANCYINDEX_NAME_LEN of ngx_http_fancyindex_module.c from 50 to 500 (or any other number greater than 50). How do you suppose I do that change automatically on every nginx rebuild?

     
  2. eva2000

    eva2000 Administrator Staff Member

    54,087
    12,177
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,735
    Local Time:
    11:27 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    I also use same theme too for fancyindex :D

    in fancyindex 0.4.0 module there is no such variable found via grep at least
    Code (Text):
    grep 'NGX_HTTP_FANCYINDEX_NAME_LEN' /svr-setup/ngx-fancyindex-0.4.0/ngx_http_fancyindex_module.c

    because there's now an nginx variable to control size
     
  3. BobbyWibowo

    BobbyWibowo Active Member

    197
    42
    28
    Jul 30, 2015
    Indonesia
    Ratings:
    +71
    Local Time:
    8:27 PM
    1.17.x
    10.3.x
    Ah, what a coincidence :D

    And thanks, the following works properly :)
    Code:
    location ^~ /path/to/deluge/downloads {
      alias /var/lib/deluge/Downloads;
      include /usr/local/nginx/conf/fancyindex.conf;
      fancyindex_name_length 500;
    }
    Though I suppose it'd have been somewhat better to edit the fancyindex.conf instead, but ehh, at least it works :D