1f3af8f7f5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1.5 KiB
1.5 KiB
Deploying ttvfx.com
The site is a fully static export, so there is no Node process to run in production.
1. Build
npm ci
npm run build # outputs ./out
2. DNS
ttvfx.com does not resolve yet. At the registrar or DNS host (Cloudflare, if
you want it alongside twotalesvfx.com), add:
| Type | Name | Value |
|---|---|---|
| A | @ |
<VPS IPv4> |
| A | www |
<VPS IPv4> |
3. Upload
rsync -avz --delete out/ user@your-vps:/var/www/ttvfx.com/
4. nginx
/etc/nginx/sites-available/ttvfx.com:
server {
listen 80;
server_name ttvfx.com www.ttvfx.com;
root /var/www/ttvfx.com;
# www -> apex
if ($host = www.ttvfx.com) { return 301 https://ttvfx.com$request_uri; }
location / {
try_files $uri $uri/ $uri.html =404;
}
# Hashed build assets can be cached forever
location /_next/static/ {
add_header Cache-Control "public, max-age=31536000, immutable";
}
error_page 404 /404.html;
gzip on;
gzip_types text/css application/javascript image/svg+xml application/json;
}
sudo ln -s /etc/nginx/sites-available/ttvfx.com /etc/nginx/sites-enabled/
sudo nginx -t && sudo systemctl reload nginx
sudo certbot --nginx -d ttvfx.com -d www.ttvfx.com # HTTPS via Let's Encrypt
(For Apache, set DocumentRoot to the same folder plus ErrorDocument 404 /404.html.
Because the build uses trailingSlash, every page is a folder with its own index.html.)