Ship production optimization M1-M12.5A: queues, metrics, HTTP observability, and vector search reliability.
Keep similar-ai from tripping the global circuit on a lone URL 502, clamp Qdrant search to 100, and add Server-Timing plus slow-request logging. Studio shared props, Academy S3 exists caching, heat chunking, and Redis/scheduler hygiene stay in this rollout.
This commit is contained in:
+27
-18
@@ -1,38 +1,47 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
# Nginx static sitemap file serving
|
||||
# ---------------------------------------------------------------------------
|
||||
# Include this snippet inside your `server {}` block BEFORE the main
|
||||
# `location /` (or `location ~ \.php$`) block so nginx serves the pre-built
|
||||
# static XML files without ever touching PHP/FPM.
|
||||
# Compatible with the production skinbase.org vhost, which has NO named
|
||||
# location @php. Laravel is already wired as:
|
||||
#
|
||||
# The GenerateSitemapsCommand writes these files on a schedule (every 6 h):
|
||||
# public/sitemap.xml <- root sitemap index
|
||||
# public/sitemaps/{name}.xml <- per-family / per-shard documents
|
||||
# location / {
|
||||
# try_files $uri $uri/ /index.php?$query_string;
|
||||
# }
|
||||
# location = /index.php {
|
||||
# fastcgi_pass unix:/run/php/php8.4-fpm-skinbase.sock;
|
||||
# ...
|
||||
# }
|
||||
#
|
||||
# When a file has not been generated yet (first deploy, cold start) the
|
||||
# request falls through to @php and Laravel's SitemapController builds it
|
||||
# live on the first hit.
|
||||
# Do not add `try_files ... @php` — that named location does not exist on
|
||||
# server3 and nginx -t / runtime would fail (or 500) when the static file
|
||||
# is missing.
|
||||
#
|
||||
# GenerateSitemapsCommand writes:
|
||||
# public/sitemaps/index.xml <- canonical generated root index
|
||||
# public/sitemaps/sitemap.xml <- legacy filename (best-effort)
|
||||
# public/sitemap.xml <- legacy $uri (often unwritable on prod)
|
||||
# public/sitemaps/{name}.xml <- child / shard documents
|
||||
#
|
||||
# Place these location blocks BEFORE `location /` is not required if they are
|
||||
# more specific (`=` and regex), but they must remain inside the 443 server.
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
# Root sitemap index
|
||||
location = /sitemap.xml {
|
||||
# Serve the static file if it exists; otherwise fall through to PHP.
|
||||
try_files $uri @php;
|
||||
# Prefer the scheduler-writable generated index. Fall back to the legacy
|
||||
# sitemaps/sitemap.xml, then Laravel front controller (not @php).
|
||||
try_files /sitemaps/index.xml /sitemaps/sitemap.xml /index.php?$query_string;
|
||||
|
||||
# Instruct downstream caches / crawlers how long the file is fresh.
|
||||
add_header Cache-Control "public, max-age=21600" always; # 6 h
|
||||
add_header Cache-Control "public, max-age=21600" always;
|
||||
add_header Content-Type "application/xml; charset=UTF-8" always;
|
||||
|
||||
# Optional: let nginx set a strong ETag automatically (default behaviour).
|
||||
etag on;
|
||||
}
|
||||
|
||||
# Per-family / per-shard sitemap documents
|
||||
location ~ ^/sitemaps/[A-Za-z0-9_\-]++\.xml$ {
|
||||
try_files $uri @php;
|
||||
try_files $uri /index.php?$query_string;
|
||||
|
||||
add_header Cache-Control "public, max-age=21600" always; # 6 h
|
||||
add_header Cache-Control "public, max-age=21600" always;
|
||||
add_header Content-Type "application/xml; charset=UTF-8" always;
|
||||
|
||||
etag on;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user