34 lines
692 B
Nginx Configuration File
34 lines
692 B
Nginx Configuration File
server {
|
|
listen 80;
|
|
server_name _;
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
# Bilder-Verzeichnis: JSON-Listing fuer dynamische Galerie
|
|
location /images/fulls/ {
|
|
autoindex on;
|
|
autoindex_format json;
|
|
}
|
|
|
|
location /images/thumbs/ {
|
|
autoindex on;
|
|
autoindex_format json;
|
|
}
|
|
|
|
# Caching fuer Bilder und Assets
|
|
location ~* \.(jpg|jpeg|png|gif|svg|ico|css|js|woff|woff2|ttf|eot|otf|webp)$ {
|
|
expires 30d;
|
|
add_header Cache-Control "public, no-cache";
|
|
}
|
|
|
|
# SPA-Fallback
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
# Sicherheit
|
|
location ~ /\. {
|
|
deny all;
|
|
}
|
|
}
|