- deploy_site now defaults to new VPS (94.130.36.94, /var/www/lynglang); use --old to deploy to d.lynglang.com as before - infra/setup_vps.yml: Ansible playbook installs nginx + certbot, obtains SSL cert for lynglang.com, fixes Debian buster EOL apt sources - infra/inventory.ini and infra/templates/nginx_lynglang.conf.j2 included Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
25 lines
529 B
Django/Jinja
25 lines
529 B
Django/Jinja
server {
|
|
listen 80;
|
|
server_name {{ domain }} www.{{ domain }};
|
|
|
|
root {{ web_root }}/release/dist;
|
|
index index.html;
|
|
|
|
# SPA fallback
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
# Distributables served directly
|
|
location /distributables/ {
|
|
try_files $uri =404;
|
|
autoindex on;
|
|
}
|
|
|
|
# Long-lived cache for hashed assets
|
|
location ~* \.(js|css|woff2?|ttf|eot|svg|png|jpg|ico)$ {
|
|
expires 1y;
|
|
add_header Cache-Control "public, immutable";
|
|
}
|
|
}
|