server { listen 80; # If you have a domain name, add it here, otherwise use your NAS's IP # server_name aur.your-nas.local; root /mnt/aur-mirror; # Enable directory listing autoindex on; # Important security: Block access to .git internal files location ~ /\.git { deny all; return 403; } # Set correct MIME types for Git files location ~* \.(git|pack|idx)$ { add_header Content-Type application/x-git-receive-pack; } # Improve caching for static files location ~* \.(pack|idx)$ { expires 30d; add_header Cache-Control "public, immutable"; } }