Files
Cozy-Den/nginx.conf
T
Latte 077cc06d75
CI / ci (push) Successful in 26s
CI / ci (pull_request) Successful in 27s
Docker / docker (pull_request) Successful in 15s
Enterprise AI Code Review / ai-review (pull_request) Successful in 1m53s
Security / security (pull_request) Successful in 6s
Add blog via Astro content collections
Introduce blog support: content collection schema, listing and post
routes, and a sample Markdown post. Update docs and TODO; add blog
assets dir and adjust color variables in docs. Also set
absolute_redirect off in nginx.conf for container routing.
2026-03-02 19:13:30 +01:00

33 lines
872 B
Nginx Configuration File

server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
index index.html;
absolute_redirect off;
# Gzip compression
gzip on;
gzip_vary on;
gzip_min_length 1024;
gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/xml+rss application/javascript application/json;
# Security headers
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-XSS-Protection "1; mode=block" always;
# Cache static assets
location ~* \.(jpg|jpeg|png|gif|ico|css|js|svg|woff|woff2|ttf|eot)$ {
expires 1y;
add_header Cache-Control "public, immutable";
}
# Main location
location / {
try_files $uri $uri/ /index.html;
}
# Custom error pages
error_page 404 /404.html;
}