server {
  listen 80;
  server_name _;

  # Django collected static files
  location /static/ {
    alias /var/www/static/;
    access_log off;
    expires 30d;
    add_header Cache-Control "public";
  }

  # Django media (user uploads)
  location /media/ {
    alias /var/www/media/;
    access_log off;
    expires 7d;
    add_header Cache-Control "public";
  }

  # No dotfiles
  location ~ /\. {
    deny all;
  }
}

