← back to Gallery Agentabrams

deploy/gallery.agentabrams.com.nginx

29 lines

# gallery.agentabrams.com — Agent Abrams build gallery (public static hub)
# HTTP-only bootstrap vhost. Certbot --nginx rewrites this to add the :443 SSL
# server + the http->https redirect on first deploy.
server {
    listen 45.61.58.125:80;
    server_name gallery.agentabrams.com;

    access_log /var/log/nginx/gallery.agentabrams.com.access.log;
    error_log /var/log/nginx/gallery.agentabrams.com.error.log;

    add_header X-Content-Type-Options "nosniff" always;
    add_header Referrer-Policy "strict-origin-when-cross-origin" always;

    root /var/www/gallery.agentabrams.com;
    index index.html;
    autoindex off;

    # builds ship self-contained MP4 motion clips — cache them hard
    location ~* \.(mp4|webm|jpg|jpeg|png|webp)$ {
        expires 30d;
        add_header Cache-Control "public, max-age=2592000";
        try_files $uri =404;
    }

    location / {
        try_files $uri $uri/ $uri.html =404;
    }
}