server {
        listen   80;
        listen   [::]:80;

        root /home/pi/data/;
        server_name localhost;

        autoindex on;
        autoindex_format xml;
        autoindex_exact_size off;
        autoindex_localtime on;

        location / {
                try_files $uri @autoindex;
        }

        location @autoindex {
                xslt_stylesheet /home/pi/PlanktoScope/scripts/gallery/nginx_template.xslt path='$uri';
        }

        # assets, media
        location ~* \.(?:css(\.map)?|js(\.map)?|svg|ttf|eot|woff|woff2)$ {
                root /home/pi/PlanktoScope/scripts/gallery/;
                expires    30d;
                access_log off;
        }

        location /bootstrap.min.css {
                try_files $uri /bootstrap.min.css;
        }

        location /webfonts/ {
                try_files $uri /webfonts/$uri;
        }

}
