37 lines
883 B
Plaintext
37 lines
883 B
Plaintext
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/PlanktonScope/scripts/gallery/nginx_template.xslt path='$uri';
|
|
}
|
|
|
|
# assets, media
|
|
location ~* \.(?:css(\.map)?|js(\.map)?|svg|ttf|eot|woff|woff2)$ {
|
|
root /home/pi/PlanktonScope/scripts/gallery/;
|
|
expires 30d;
|
|
access_log off;
|
|
}
|
|
|
|
location /bootstrap.min.css {
|
|
try_files $uri /bootstrap.min.css;
|
|
}
|
|
|
|
location /webfonts/ {
|
|
try_files $uri /webfonts/$uri;
|
|
}
|
|
|
|
}
|