location / {
    rewrite ^/$ $1{{ iiab_home_url }};
}

location /usb {
    alias /library/www/html/local_content/;
    fancyindex on;    # autoindex on;
}

location /local_content/ {
    fancyindex on;    # autoindex on;
}

location /info {
    fancyindex on;    # Directory listing for http://box/info/admin-console/
    fancyindex_exact_size off;  # Output human-readable file sizes.
}

location /modules/ {
    fancyindex on;              # Enable fancy indexes.
    fancyindex_exact_size off;  # Output human-readable file sizes.
    fancyindex_ignore index.htmlf rachel-index.php;
}

location /js-menu/ {
    fancyindex on;    # autoindex on;
    location /js-menu/menu-files/js/ {
        fancyindex off;    # autoindex off;
    }
    location /js-menu/menu-files/services/ {
        fancyindex off;    # autoindex off;
    }
}

location /software/ {
    fancyindex on;              # Enable fancy indexes.
    fancyindex_exact_size off;  # Output human-readable file sizes.
    location ~* \.(apk)$ {
        add_header Content-Type application/vnd.android.package-archive;
    }

    location ~* \.(zim)$ {
        add_header Content-Type application/zip;
    }
}
