2026-03-19 03:22:23 -04:00
|
|
|
# ── AlexanderWhitestone.com — The Wizard's Tower ────────────────────────────
|
|
|
|
|
#
|
|
|
|
|
# Two rooms. No hallways. No feature creep.
|
|
|
|
|
# /world/ — The Workshop (3D scene, Three.js)
|
|
|
|
|
# /blog/ — The Scrolls (static posts, RSS feed)
|
|
|
|
|
#
|
|
|
|
|
# Static-first. No tracking. No analytics. No cookie banner.
|
|
|
|
|
# Site root: /var/www/alexanderwhitestone.com
|
|
|
|
|
|
2026-03-05 23:49:56 -05:00
|
|
|
server {
|
|
|
|
|
listen 80;
|
2026-03-19 03:22:23 -04:00
|
|
|
server_name alexanderwhitestone.com www.alexanderwhitestone.com;
|
|
|
|
|
|
|
|
|
|
root /var/www/alexanderwhitestone.com;
|
|
|
|
|
index index.html;
|
|
|
|
|
|
|
|
|
|
# ── Security headers ────────────────────────────────────────────────────
|
|
|
|
|
add_header X-Content-Type-Options nosniff always;
|
|
|
|
|
add_header X-Frame-Options SAMEORIGIN always;
|
|
|
|
|
add_header Referrer-Policy strict-origin-when-cross-origin always;
|
|
|
|
|
add_header X-XSS-Protection "1; mode=block" always;
|
|
|
|
|
|
|
|
|
|
# ── Gzip for text assets ────────────────────────────────────────────────
|
|
|
|
|
gzip on;
|
|
|
|
|
gzip_types text/plain text/css text/xml text/javascript
|
|
|
|
|
application/javascript application/json application/xml
|
|
|
|
|
application/rss+xml application/atom+xml;
|
|
|
|
|
gzip_min_length 256;
|
|
|
|
|
|
|
|
|
|
# ── The Workshop — 3D world assets ──────────────────────────────────────
|
|
|
|
|
location /world/ {
|
|
|
|
|
try_files $uri $uri/ /world/index.html;
|
|
|
|
|
|
|
|
|
|
# Cache 3D assets aggressively (models, textures)
|
|
|
|
|
location ~* \.(glb|gltf|bin|png|jpg|webp|hdr)$ {
|
|
|
|
|
expires 30d;
|
|
|
|
|
add_header Cache-Control "public, immutable";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Cache JS with revalidation (for Three.js updates)
|
|
|
|
|
location ~* \.js$ {
|
|
|
|
|
expires 7d;
|
|
|
|
|
add_header Cache-Control "public, must-revalidate";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# ── The Scrolls — blog posts and RSS ────────────────────────────────────
|
|
|
|
|
location /blog/ {
|
|
|
|
|
try_files $uri $uri/ =404;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# RSS/Atom feed — correct content type
|
|
|
|
|
location ~* \.(rss|atom|xml)$ {
|
|
|
|
|
types { }
|
|
|
|
|
default_type application/rss+xml;
|
|
|
|
|
expires 1h;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# ── Static assets (fonts, favicon) ──────────────────────────────────────
|
|
|
|
|
location /static/ {
|
|
|
|
|
expires 30d;
|
|
|
|
|
add_header Cache-Control "public, immutable";
|
2026-03-05 23:49:56 -05:00
|
|
|
}
|
|
|
|
|
|
2026-03-19 03:22:23 -04:00
|
|
|
# ── Entry hall ──────────────────────────────────────────────────────────
|
2026-03-05 23:49:56 -05:00
|
|
|
location / {
|
2026-03-19 03:22:23 -04:00
|
|
|
try_files $uri $uri/ =404;
|
2026-03-05 23:49:56 -05:00
|
|
|
}
|
|
|
|
|
|
2026-03-19 03:22:23 -04:00
|
|
|
# Block dotfiles
|
|
|
|
|
location ~ /\. {
|
|
|
|
|
deny all;
|
|
|
|
|
return 404;
|
2026-03-05 23:49:56 -05:00
|
|
|
}
|
|
|
|
|
}
|