worker_processes auto; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; gzip on; gzip_vary on; gzip_proxied any; gzip_comp_level 6; gzip_min_length 256; # Compress sensible, text-based response types (HTML is covered by default) gzip_types text/plain text/css text/xml text/javascript application/javascript application/json application/ld+json application/xml application/rss+xml application/atom+xml image/svg+xml; server { listen 80 default_server; server_name _; root /var/www; index index.html; # Migration redirects from legacy site location ~ ^/archive(?:/(.*))?$ { return 307 /posts/$1$is_args$args; } location = /feed.xml { # Serve atom.xml content at the legacy feed.xml URL (no redirect) rewrite ^ /atom.xml break; } location / { try_files $uri $uri.html $uri/ =404; } } }