Get the most out of your Centmin Mod LEMP stack
Become a Member

Nginx fancyindex nginx module customisation

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

  1. BobbyWibowo

    BobbyWibowo Active Member

    196
    41
    28
    Jul 30, 2015
    Indonesia
    Ratings:
    +70
    Local Time:
    7:53 AM
    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

    45,399
    10,300
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,978
    Local Time:
    10:53 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    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

    196
    41
    28
    Jul 30, 2015
    Indonesia
    Ratings:
    +70
    Local Time:
    7:53 AM
    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