Skip to content

Configuration Reference

All runtime behaviour is controlled by magento_ultra.ini. The file lives at:

  • Linux: /etc/accelerate-guru/magento_ultra.ini
  • macOS (Homebrew): $(brew --prefix)/etc/accelerate-guru/magento_ultra.ini
  • Custom: pass --from-dir /path/to/dir to the binary

The file is hot-reloaded — most changes take effect on the next request without a restart. Exceptions are noted in the tables below.

Additional live-rule files in the same directory are also hot-reloaded:

  • blocklist.ini — IP/CIDR deny rules
  • redirects.ini — URL rewrite rules
  • text-replace.ini — global HTML text substitutions

#Table of contents


#[license]

Controls activation. The [license] section is always read from the main magento_ultra.ini — per-domain overlay files cannot override it.

KeyTypeDefaultHot-reloadDescription
keystring(empty)YesYour activation token from the account dashboard. Use dev for .test/.local/.internal hostnames (always free). Empty = transparent mode (no optimisations).
store_view_idstringallYesRestrict activation to a single Magento store view ID, or all to cover every store view served by this instance.
[license]
key            = live_xxxxxxxxxxxxxxxxxxxxxxxx
store_view_id  = all

#[server]

Core networking settings. Changes to http_port and https_port require a restart; all others are hot-reloaded.

KeyTypeDefaultHot-reloadDescription
http_portinteger80NoPort to listen for plain HTTP connections.
https_portinteger443NoPort to listen for HTTPS/TLS connections.
magento_dirpath/var/www/magentoYesPath to the Magento root directory (where app/etc/env.php lives). Used to auto-detect store configuration during --check runs.
upstream_addrstring127.0.0.1YesIP address or hostname of the Magento HTTP server (origin).
upstream_portinteger8080YesPort on which Magento (or your web server like Nginx/Apache) listens for plain HTTP.
workersinteger0NoNumber of worker threads. 0 = one per CPU core. Increase only if CPU is not the bottleneck.
[server]
http_port     = 80
https_port    = 443
magento_dir   = /var/www/magento
upstream_addr = 127.0.0.1
upstream_port = 8080
workers       = 0

#[tls_ssl]

TLS termination and certificate management. The ssl_mode key controls which certificate source is used.

KeyTypeDefaultHot-reloadDescription
upstream_tlsboolfalseYesSet to true if the upstream Magento server itself requires HTTPS (rare; only needed when Magento is on a remote server with a valid cert).
ssl_modeenumself_signedNoCertificate source: self_signed (auto-generates a multi-SAN cert), manual (provide your own cert/key), local_ca (sign with a local CA you trust), acme (auto-provision via Let's Encrypt).
ssl_certpath(empty)NoPath to PEM certificate file. Used when ssl_mode = manual.
ssl_keypath(empty)NoPath to PEM private key file. Used when ssl_mode = manual.
ssl_cache_dirpath./cache/sslNoDirectory where generated PEM material is stored (for self_signed, local_ca, acme).
ssl_extra_sansstring(empty)NoComma-separated additional Subject Alternative Names to include in generated certificates (e.g. shop.example.com,api.example.com).
acme_emailstring(empty)NoEmail address for ACME (Let's Encrypt) account registration. Required when ssl_mode = acme.
acme_directoryURLLet's Encrypt prodNoACME directory URL. Defaults to Let's Encrypt production. Use https://acme-staging-v02.api.letsencrypt.org/directory for testing.
[tls_ssl]
upstream_tls    = false
ssl_mode        = self_signed
ssl_cert        =
ssl_key         =
ssl_cache_dir   = ./cache/ssl
ssl_extra_sans  =
acme_email      =

Tip

For local development, ssl_mode = self_signed is ideal — Accelerate Guru generates a certificate automatically for every hostname it serves. Add the local CA to your browser's trust store once to avoid security warnings.


#[security]

WAF, bot detection, admin authentication, and access control. See Smart WAF & Security for the full deep-dive.

KeyTypeDefaultHot-reloadDescription
auth_modeinteger0YesHTTP Basic Auth enforcement: 0 = off, 1 = admin paths only, 2 = entire site. Use 2 on staging environments to gate access.
auth_userstringadminYesUsername for HTTP Basic Auth (when auth_mode ≥ 1).
auth_passstring(empty)YesPassword for HTTP Basic Auth. Leave empty to disable auth even when auth_mode is set.
enable_smart_wafbooltrueYesEnable the in-process WAF. Scores every request for SQL injection, path traversal, bot fingerprints, and rate violations.
disable_waf_on_adminbooltrueYesSkip WAF checks on the admin path. Admin POST bodies often resemble injection patterns (product descriptions with special chars); this avoids false positives.
admin_pathstring/adminYesYour Magento admin URL path. Used for disable_waf_on_admin scoping and auth_mode = 1.
block_thresholdinteger3YesNumber of WAF violations from one IP before it is added to the runtime blocklist automatically.
log_filepath/var/log/accelerate-guru/waf.logYesPath where WAF block events are logged.
enable_bot_detectionbooltrueYesEnable heuristic bot detection (user-agent analysis, header coherence, TLS fingerprint checks). Detected bots are challenged or blocked depending on their score.
bypass_ipsstring(empty)YesComma-separated IPs that bypass the cache and all optimisations. For debugging only — do not use in production.
[security]
auth_mode           = 0
auth_user           = admin
auth_pass           =
enable_smart_waf    = true
disable_waf_on_admin = true
admin_path          = /admin
block_threshold     = 3
log_file            = /var/log/accelerate-guru/waf.log
enable_bot_detection = true
bypass_ips          =

#[stats]

Controls the /stats-ag live dashboard.

KeyTypeDefaultHot-reloadDescription
enabledbooltrueYesEnable the dashboard. Set to false to disable entirely.
allowed_ipsstring127.0.0.1YesComma-separated IP addresses allowed to access /stats-ag. Requests from other IPs receive 403 Forbidden. Add your office IP or VPN IP here.
[stats]
enabled     = true
allowed_ips = 127.0.0.1, 10.0.0.5

#[cache]

Page caching via DragonflyDB. See DragonflyDB Power for the deep-dive.

KeyTypeDefaultHot-reloadDescription
enabledbooltrueYesMaster cache switch.
redis_hoststring127.0.0.1NoDragonflyDB (or Redis) hostname or IP.
redis_portinteger6379NoDragonflyDB port.
redis_passwordstring(empty)NoDragonflyDB authentication password (leave empty if none).
redis_dbinteger0NoDragonflyDB database index (0–15).
cache_ttl_fallbackinteger86400YesPage TTL in seconds when MySQL proxy invalidation is disabled. Default: 24 hours.
cache_exclude_paramsstringsee belowYesComma-separated query parameters stripped from the URL before computing the cache key. Marketing/tracking params should be listed here.
cache_exclude_pathsstringsee belowYesComma-separated URL prefixes that bypass the cache entirely (e.g. checkout, account).
graphql_cacheboolfalseYesCache GraphQL POST responses. Disabled by default because GraphQL queries can contain session-specific data.
static_asset_cachebooltrueYesCache optimised JS/CSS bytes so minification is not repeated on every request.
static_asset_cache_ttlinteger604800YesTTL in seconds for cached static assets. Default: 7 days.
vary_cookiesstringsee belowYesComma-separated cookie names whose values are used to segment the cache (not bypass it). Used for multi-currency/multi-locale stores.
customer_cache_ttl_secsinteger30YesTTL in seconds for per-customer page cache entries (logged-in visitors). Shorter than the anonymous TTL because logged-in pages can change frequently.
customer_data_endpoint_ttl_secsinteger10YesTTL in seconds for customer-data JSON responses (e.g. /customer/section/load/). Very short to keep cart and messages fresh.
customer_data_endpointsstringsee belowYesComma-separated URL prefixes treated as per-customer data endpoints and cached with customer_data_endpoint_ttl_secs.

Default excluded params: gclid, utm_source, utm_medium, utm_campaign, utm_content, utm_term, fbclid

Default excluded paths: /customer/, /checkout/, /wishlist/, /sales/, /newsletter/, /paypal/, /multishipping/

Default vary cookies: esw-currency, esw-location, store

Default customer data endpoints: /customer/section/load/

[cache]
enabled               = true
redis_host            = 127.0.0.1
redis_port            = 6379
redis_password        =
redis_db              = 0
cache_ttl_fallback    = 86400
cache_exclude_params  = gclid,utm_source,utm_medium,utm_campaign,utm_content,utm_term,fbclid
cache_exclude_paths   = /customer/,/checkout/,/wishlist/,/sales/,/newsletter/,/paypal/,/multishipping/
graphql_cache         = false
static_asset_cache    = true
static_asset_cache_ttl = 604800
vary_cookies          = esw-currency,esw-location,store
customer_cache_ttl_secs              = 30
customer_data_endpoint_ttl_secs      = 10
customer_data_endpoints              = /customer/section/load/

#[magento_redis]

Read-only connection to Magento's own Redis/DragonflyDB Full Page Cache. Used for tag-based cache invalidation — when Magento evicts a tag, Accelerate Guru receives the signal and evicts its own matching entries. Disabled by default.

Not the same as session storage. Magento uses separate Redis databases for FPC (typically db 1) and PHP sessions (typically db 2). The [auth_detection] section below connects to the session database.

KeyTypeDefaultHot-reloadDescription
enabledboolfalseYesEnable Magento Redis FPC integration.
hoststring127.0.0.1NoMagento's Redis host.
portinteger6379NoMagento's Redis port.
passwordstring(empty)NoMagento's Redis password.
dbinteger1NoMagento typically uses database 1 for FPC.

#[auth_detection]

Controls how Accelerate Guru classifies each incoming request as Anonymous, Customer, or Admin. The classification drives cache key selection (anonymous requests share one slot; each logged-in customer gets their own) and cache-bypass logic (admin requests are never cached).

The primary method (mode = auto) reads Magento's PHP session directly from Redis using the address declared in app/etc/env.php. This is authoritative — it works even when the browser has cleared frontend_cid or other client-side cookies that AG previously relied on. When the session Redis is unavailable or sessions are file-based, AG falls back to cookie-based heuristics.

KeyTypeDefaultHot-reloadDescription
modestringautoNoDetection strategy. auto = read session Redis from env.php (recommended). cookies = legacy cookie heuristic only.
session_redis_hoststring(empty)NoOverride for Magento's session Redis host. Leave blank to use what env.php declares. This connects to the session database (e.g. db 2), not the FPC database in [magento_redis].
session_redis_portinteger6379NoOverride for Magento's session Redis port.
session_redis_dbinteger0NoOverride for Magento's session Redis database index.
session_redis_passwordstring(empty)NoOverride for Magento's session Redis password.
session_state_lru_sizeinteger5000NoMaximum number of PHPSESSID → state entries kept in process memory. Reduces Redis round-trips on burst traffic.
session_state_lru_ttl_secsinteger5NoHow long a cached classification is considered valid. A freshly-logged-in customer is recognised within this many seconds.
enable_per_customer_cachebooltrueYesGive each logged-in customer their own cache slot. When disabled, logged-in pages bypass the cache entirely (they always hit Magento).
enable_cache_poisoning_sanity_checkbooltrueYesScan the first 64 KiB of every response before storing it as anonymous. If logged-in markers are found, the entry is rejected and a counter is incremented. Cheap, highly recommended.
[auth_detection]
mode                               = auto
session_redis_host                 =
session_redis_port                 = 6379
session_redis_db                   = 0
session_redis_password             =
session_state_lru_size             = 5000
session_state_lru_ttl_secs         = 5
enable_per_customer_cache          = true
enable_cache_poisoning_sanity_check = true

#How it works

Incoming request (with PHPSESSID cookie)
  │
  ├─► In-process LRU hit? → use cached state (no Redis call)
  │
  ├─► Read sess_<PHPSESSID> from Magento session Redis
  │       ├─ customer_id > 0  → Customer { id, group }  → per-customer cache key
  │       ├─ user_id in admin block → Admin              → bypass cache
  │       └─ none of the above   → Anonymous             → shared cache key
  │
  └─► Session Redis unreachable or file-based sessions?
          → Cookie heuristic fallback (frontend_cid, admin= cookie)

After an anonymous response is received from upstream, the sanity check scans for markers like "isLoggedIn":true before committing the entry to the shared anonymous cache. This prevents a race condition where Magento returns logged-in HTML for a session that the proxy just classified as anonymous.


#[mysql_proxy]

An optional MySQL query cache that sits between Magento's PHP application and the MySQL database. Point Magento's env.php at listen_port instead of the real MySQL port to enable it. See DragonflyDB Power for the architecture.

KeyTypeDefaultHot-reloadDescription
enabledboolfalseNoEnable the MySQL proxy. Requires a restart.
listen_portinteger3307NoPort on which the MySQL proxy listens. Point Magento at this port.
mysql_hoststring127.0.0.1NoActual MySQL/MariaDB host.
mysql_portinteger3306NoActual MySQL port.
mysql_userstring(empty)NoMySQL username.
mysql_passwordstring(empty)NoMySQL password.
select_cache_enabledbooltrueYesCache SELECT query results. Invalidated automatically on INSERT/UPDATE/DELETE/DDL for the same table.
cache_ttl_fallbackinteger0YesTTL for cached queries in seconds. 0 = never expire (invalidated only by writes).
warmup_sitemapURL(empty)YesURL of an XML sitemap. At startup, the proxy fetches all URLs and populates the page cache.
warmup_concurrencyinteger2YesNumber of concurrent warmup fetches.
[mysql_proxy]
enabled             = false
listen_port         = 3307
mysql_host          = 127.0.0.1
mysql_port          = 3306
mysql_user          = magento
mysql_password      = secret
select_cache_enabled = true
cache_ttl_fallback  = 0
warmup_sitemap      = https://yourstore.com/sitemap.xml
warmup_concurrency  = 4

#[network]

HTTP response headers and compression settings.

KeyTypeDefaultHot-reloadDescription
compression_prioritystringzstd,br,gzipYesOrder of preferred compression encodings. The first one the browser supports is used. All three variants are generated at cache-fill time; selection is zero-CPU at request time.
static_cache_max_ageinteger31536000YesCache-Control: max-age for static assets (CSS, JS, images). Default: 1 year (browsers only re-fetch when the URL changes).
page_cache_controlstringpublic, max-age=5, stale-while-revalidate=60YesCache-Control header sent on HTML responses. stale-while-revalidate lets browsers serve a stale page while fetching a fresh one — users never see a loading spinner on repeat visits.
robots_txt_fallbackbooltrueYesServe a permissive robots.txt when the upstream returns an error (prevents unnecessary crawl blocks during maintenance).
learn_early_hintsbooltrueYesCollect critical resource URLs from HTML responses and emit them as HTTP/2 103 Early Hints on the next request.

#[service_worker]

Browser-side caching via a registered Service Worker. See SSE Service Worker for the deep-dive.

KeyTypeDefaultHot-reloadDescription
enabledboolfalseYesEnable the service worker. Test thoroughly on your theme before enabling in production — see the deep-dive guide.
modeenumadaptiveYesoff = inject nothing. static = cache JS/CSS/fonts/images only. html = also cache HTML pages. adaptive = like html, but auto-downgrades to static when session cookies are detected.
realtime_invalidationbooltrueYesPush SSE invalidation events to the browser when product prices or stock change. Requires enabled = true.
bypass_pathsstringsee belowYesURL prefixes the service worker must never intercept. Always include checkout and account paths.
html_max_ageinteger600YesMaximum age (seconds) of HTML pages cached in the service worker. After this, the SW serves stale and fetches fresh in the background.
themeenumautoYesauto = detect theme from response. skip = disable theme-specific compatibility patches entirely. force = always apply patches regardless of detection.

Default bypass paths: /checkout, /customer, /admin, /rest/, /graphql, /paypal, /onepage, /sales


#[optimization_global]

Master switches for all HTML optimisations.

KeyTypeDefaultHot-reloadDescription
enabledbooltrueYesMaster optimisation switch. Set to false to disable all HTML rewrites instantly (useful for emergency debugging).
html_rewritebooltrueYesEnable HTML response rewriting. When false, responses are passed through unchanged (compression and caching still work).

#[optimization_html]

Fine-grained HTML transformation controls.

KeyTypeDefaultHot-reloadDescription
enable_dom_flatteningbooltrueYesCollapse single-child wrapper elements to reduce DOM depth and improve INP (Interaction to Next Paint).
max_dom_depthinteger20YesMaximum DOM depth before flattening is applied.
add_nofollowboolfalseYesInject <meta name="robots" content="noindex,nofollow">. Warning: this blocks all search engine indexing. Use only on staging/dev environments.
inject_preconnectbooltrueYesAdd <link rel="preconnect"> and <link rel="dns-prefetch"> for detected third-party origins (fonts, analytics, payment SDKs).
enforce_accessibilitybooltrueYesAuto-fix common accessibility issues: missing alt attributes, broken ARIA roles, missing viewport user-scalable.
fix_aria_rolesbooltrueYesCorrect invalid or misplaced ARIA role attributes.
fix_touch_targetsboolfalseYesIncrease the CSS minimum touch target size to 44×44 px (WCAG 2.5.5). May conflict with theme styles — test before enabling.
fix_contrastboolfalseYesIncrease text contrast to meet WCAG AA minimums where violations are detected. May conflict with brand colours — test before enabling.
auto_meta_descriptionbooltrueYesGenerate a <meta name="description"> from page content when one is absent.
remove_unload_handlersbooltrueYesStrip onunload event handlers that prevent the page from entering the bfcache (back/forward cache). Significant performance win for repeat navigation.
esi_enabledboolfalseYesProcess <esi:include> tags (Varnish/ESI mode). Enable only if your Nginx/Apache is configured to pass ESI syntax.
luma_block_cacheboolfalseYesCache Luma theme header/footer/navigation blocks separately for faster assembly.
theme_familyenumautoYesauto = detect per response. Force to luma, hyva, or generic if auto-detection causes issues.
content_visibilityboolfalseYesInject content-visibility: auto on long off-screen lists (PLP grids, reviews, related products, footer). Improves INP and Total Blocking Time. Opt-in — test on custom themes before enabling.
inject_structured_databoolfalseYesInject JSON-LD product schema into product pages. Experimental — extraction heuristics may not be accurate for all themes.
critical_css_extractionboolfalseYesAutomatically extract and inline critical CSS. Requires a warmup pass to build the critical CSS database.

#[optimization_assets]

JavaScript and CSS optimisation.

KeyTypeDefaultHot-reloadDescription
enable_tree_shakingbooltrueYesMinify and tree-shake JavaScript bundles using the oxc compiler. Typically reduces JS size by 20–35%.
enable_critical_cssboolfalseYesDefer non-critical stylesheets. Warning: requires proper critical CSS (see critical_css_extraction) or you will see a Flash of Unstyled Content (FOUC).
force_defer_jsbooltrueYesAdd defer to all <script> tags that lack it. Non-blocking JS loading is the single biggest Lighthouse TBT improvement on most Magento stores.
delay_third_party_jsboolfalseYesDelay all third-party JS and iframes until after the first user interaction. Dramatically improves Lighthouse on stores with many trackers/chat widgets. A built-in skiplist protects payment SDKs, anti-fraud tools, and CAPTCHAs.
delay_third_party_overridesstring(empty)YesForce or prevent delay for specific hosts. Prefix with ! to never delay. Example: analytics.example.com,!pay.stripe.com
css_minifybooltrueYesMinify CSS responses.
inject_script_preloadsbooltrueYesAdd <link rel="preload" as="script"> for critical first-party scripts.
inline_critical_jsboolfalseYesInline small critical scripts directly into the HTML. Saves a network round-trip but risks serving stale code if the script changes.
inline_critical_js_max_sizeinteger32768YesMaximum size (bytes) of scripts eligible for inlining. Default: 32 KB.

#[optimization_fonts]

Self-hosted Google / Bunny font proxying. Eliminates the third-party DNS+TLS round-trip and prevents GDPR-concern IP leakage to Google's servers.

KeyTypeDefaultHot-reloadDescription
enabledboolfalseYesEnable font self-hosting. When enabled, Google/Bunny font CSS is fetched and rewritten to serve fonts from your edge.
backendenumgoogleYesFont source: google (fonts.googleapis.com) or bunny (fonts.bunny.net — tracker-free mirror).
cache_dirpath./cache/fontsYesDirectory where downloaded font files are stored.
preload_top_ninteger2YesInject <link rel="preload" as="font"> for the first N fonts in a page's @font-face list.
force_displayenumswapYesValue for font-display in @font-face rules when rewriting external (Google/Bunny) font CSS. swap prevents invisible text during load.
force_font_displayenumswapYesValue for font-display applied when rewriting self-hosted @font-face declarations already present in your theme's CSS. Mirrors force_display for local fonts.
keep_unicode_rangesstring(empty)YesComma-separated unicode-range names to retain (e.g. latin,latin-ext). Empty = keep all. Use to reduce font download size.
fetch_timeout_secsinteger8YesTimeout for fetching font files from the upstream font service.

#[optimization_images]

AVIF/WebP encoding and image optimisation pipeline. See Edge Image Pipeline for full details.

KeyTypeDefaultHot-reloadDescription
image_avifbooltrueYesEnable AVIF encoding. Images in HTML responses are rewritten to serve AVIF to browsers that support it.
avif_qualityinteger65YesAVIF quality (1–100). 65 is an excellent balance of file size and visual quality. Values above 80 produce files nearly as large as JPEG with little visible benefit.
avif_speedinteger1YesAVIF encoder speed (1–10). 1 = slowest/smallest, 10 = fastest/largest. In background encoding, slow is always preferred.
avif_max_sizeinteger10485760YesSkip AVIF encoding for images larger than this (bytes). Default: 10 MB.
image_cache_dirpath./cache/imagesYesDirectory for storing encoded AVIF/WebP files.
avif_on_the_flyboolfalseYestrue = encode AVIF synchronously on the first request (adds latency). false = serve original on first request, encode in background (recommended).
image_placeholdersboolfalseYesGenerate BlurHash low-resolution placeholders for lazy-loaded images. Provides a pleasant loading experience.
image_revalidation_intervalinteger1800YesRe-check cached images against the origin every N seconds. Default: 30 minutes.
freshness_max_ageinteger5YesIf an upstream Age response header exceeds this (seconds), force a fresh fetch instead of caching the already-stale response. 0 = disabled.
inject_asset_dimensionsbooltrueYesAdd width and height attributes to <img> elements that lack them. Eliminates Cumulative Layout Shift (CLS).
preload_lcp_imagebooltrueYesDetect the Largest Contentful Paint image and add fetchpriority="high" and a <link rel="preload"> for it. Largest single LCP improvement available.
optimize_above_foldbooltrueYesDisable lazy-loading on the first N images so they load immediately.
above_fold_countinteger3YesNumber of images to treat as above-fold (when optimize_above_fold = true).
responsive_imagesbooltrueYesGenerate srcset and sizes attributes on product images to serve appropriately sized images for each device.

#[optimization_speculation]

Chrome/Edge Speculation Rules for prerendering and prefetching pages before the user clicks. See Smart Speculation.

KeyTypeDefaultHot-reloadDescription
enabledbooltrueYesEnable Speculation Rules injection.
smart_speculationbooltrueYesUse navigation pattern learning to refine speculation targets.
home_prerenderstringsee defaultYesURL patterns eligible for prerendering from the homepage.
category_prefetchstringsee defaultYesURL patterns eligible for prefetching from category pages.
product_prefetchstringsee defaultYesURL patterns eligible for prefetching from product pages.
eagernessenummoderateYesconservative = only on explicit hover. moderate = hover + visible links. eager = all eligible links immediately.

Defaults:

  • home_prerender = /catalog/category/view/*, /cms/*
  • category_prefetch = /catalog/product/view/*
  • product_prefetch = /checkout/cart, /checkout

#[domain_masking]

Multi-host configuration. See Domain Masking for the full guide.

Note

The [domain_masking] section is not present in the default magento_ultra.ini because it is only needed when you serve multiple hostnames. To activate it, add the section to your config file (or to a per-domain overlay under domain_masking/hostname.ini). The defaults listed below apply when the section is absent — link rewriting is enabled for all content types by default as soon as you create an overlay file.

KeyTypeDefaultHot-reloadDescription
enabledbooltrueYesEnable domain masking (link rewriting for masked hosts).
rewrite_htmlbooltrueYesRewrite origin host references in HTML responses.
rewrite_cssbooltrueYesRewrite in CSS (e.g. background-image: url() references).
rewrite_xmlbooltrueYesRewrite in XML (sitemaps, RSS feeds).
rewrite_jsonbooltrueYesRewrite in JSON API responses.
rewrite_jsbooltrueYesRewrite in JavaScript (careful with minified bundles).
rewrite_set_cookiebooltrueYesRewrite Domain= attribute in Set-Cookie headers.
rewrite_locationbooltrueYesRewrite Location: redirect headers.
rewrite_link_headerbooltrueYesRewrite Link: preload headers.
rewrite_cspbooltrueYesRewrite Content-Security-Policy headers to include the public host.
rewrite_inline_jsbooltrueYesRewrite host references inside inline <script> blocks.
rewrite_request_bodyboolfalseYesRewrite the request body (e.g. GraphQL variables containing absolute URLs). Disabled by default for performance.
strict_misdirectedboolfalseYesReject requests with 421 Misdirected Request if the Host header doesn't match a known masked domain.
public_hoststring(empty)YesThe public hostname this overlay applies to. Set in per-domain overlay files.
origin_hoststring(empty)YesThe Magento origin hostname (as it appears in HTML/URLs inside Magento).
aliasesstring(empty)YesExtra origin→public host pairs, comma-separated as origin=public.

Per-domain overrides live in domain_masking/hostname.ini files and inherit all main config settings.


#Live rule files

#blocklist.ini

One rule per line. Hot-reloaded within 500 ms of any change.

; Block a specific IP
203.0.113.42

; Block an entire subnet
198.51.100.0/24

; Allow-override (wins over any block)
!203.0.113.1

; Comments start with ; or #

#redirects.ini

One rule per line in the format pattern = target [status]. Patterns are regular expressions. Hot-reloaded on every request.

; Simple path redirect (301 permanent)
^/old-product-url$ = /new-product-url 301

; Regex with capture group (302 temporary)
^/blog/(\d{4})/(.+)$ = /articles/$1/$2 302

; Redirect old category URL
^/category\.html$ = /new-category 301

Note

Redirects are evaluated before the cache lookup. This means redirecting is always fast, even on cache misses.

#text-replace.ini

Global find-and-replace applied to every HTML response. One pair per line.

; Replace a phone number across all pages
+1 (555) 000-0000 = +1 (555) 123-4567

; Update a brand name after rebranding
Old Company Name = New Company Name

; Fix a typo that appears in many places
recieve = receive

#Full default config

; Accelerate Guru — magento_ultra.ini
; Hot-reloaded. Most changes take effect on the next request.

[license]
key            =
store_view_id  = all

[server]
http_port      = 80
https_port     = 443
magento_dir    = /var/www/magento
upstream_addr  = 127.0.0.1
upstream_port  = 8080
workers        = 0

[tls_ssl]
upstream_tls   = false
ssl_mode       = self_signed
ssl_cert       =
ssl_key        =
ssl_cache_dir  = ./cache/ssl
ssl_extra_sans =
acme_email     =
acme_directory = https://acme-v02.api.letsencrypt.org/directory

[security]
auth_mode            = 0
auth_user            = admin
auth_pass            =
enable_smart_waf     = true
disable_waf_on_admin = true
admin_path           = /admin
block_threshold      = 3
log_file             = /var/log/accelerate-guru/waf.log
enable_bot_detection = true
bypass_ips           =

[stats]
enabled     = true
allowed_ips = 127.0.0.1

[cache]
enabled               = true
redis_host            = 127.0.0.1
redis_port            = 6379
redis_password        =
redis_db              = 0
cache_ttl_fallback    = 86400
cache_exclude_params  = gclid,utm_source,utm_medium,utm_campaign,utm_content,utm_term,fbclid
cache_exclude_paths   = /customer/,/checkout/,/wishlist/,/sales/,/newsletter/,/paypal/,/multishipping/
graphql_cache         = false
static_asset_cache    = true
static_asset_cache_ttl = 604800
vary_cookies          = esw-currency,esw-location,store
customer_cache_ttl_secs              = 30
customer_data_endpoint_ttl_secs      = 10
customer_data_endpoints              = /customer/section/load/

[magento_redis]
enabled  = false
host     = 127.0.0.1
port     = 6379
password =
db       = 1

[auth_detection]
mode                               = auto
session_redis_host                 =
session_redis_port                 = 6379
session_redis_db                   = 0
session_redis_password             =
session_state_lru_size             = 5000
session_state_lru_ttl_secs         = 5
enable_per_customer_cache          = true
enable_cache_poisoning_sanity_check = true

[mysql_proxy]
enabled              = false
listen_port          = 3307
mysql_host           = 127.0.0.1
mysql_port           = 3306
mysql_user           =
mysql_password       =
select_cache_enabled = true
cache_ttl_fallback   = 0
warmup_sitemap       =
warmup_concurrency   = 2

[network]
compression_priority  = zstd,br,gzip
static_cache_max_age  = 31536000
page_cache_control    = public, max-age=5, stale-while-revalidate=60
robots_txt_fallback   = true
learn_early_hints     = true

[service_worker]
enabled              = false
mode                 = adaptive
realtime_invalidation = true
bypass_paths         = /checkout,/customer,/admin,/rest/,/graphql,/paypal,/onepage,/sales
html_max_age         = 600
theme                = auto   ; auto | skip | force

[optimization_global]
enabled      = true
html_rewrite = true

[optimization_html]
enable_dom_flattening    = true
max_dom_depth            = 20
add_nofollow             = false
inject_preconnect        = true
enforce_accessibility    = true
fix_aria_roles           = true
fix_touch_targets        = false
fix_contrast             = false
auto_meta_description    = true
remove_unload_handlers   = true
esi_enabled              = false
luma_block_cache         = false
theme_family             = auto
content_visibility       = false
inject_structured_data   = false
critical_css_extraction  = false

[optimization_assets]
enable_tree_shaking       = true
enable_critical_css       = false
force_defer_js            = true
delay_third_party_js      = false
delay_third_party_overrides =
css_minify                = true
inject_script_preloads    = true
inline_critical_js        = false
inline_critical_js_max_size = 32768

[optimization_fonts]
enabled            = false
backend            = google
cache_dir          = ./cache/fonts
preload_top_n      = 2
force_display      = swap
force_font_display = swap
keep_unicode_ranges =
fetch_timeout_secs = 8

[optimization_images]
image_avif                  = true
avif_quality                = 65
avif_speed                  = 1
avif_max_size               = 10485760
image_cache_dir             = ./cache/images
avif_on_the_fly             = false
image_placeholders          = false
image_revalidation_interval = 1800
freshness_max_age           = 5
inject_asset_dimensions     = true
preload_lcp_image           = true
optimize_above_fold         = true
above_fold_count            = 3
responsive_images           = true

[optimization_speculation]
enabled           = true
smart_speculation = true
home_prerender    = /catalog/category/view/*, /cms/*
category_prefetch = /catalog/product/view/*
product_prefetch  = /checkout/cart, /checkout
eagerness         = moderate

[domain_masking]
enabled              = true
rewrite_html         = true
rewrite_css          = true
rewrite_xml          = true
rewrite_json         = true
rewrite_js           = true
rewrite_set_cookie   = true
rewrite_location     = true
rewrite_link_header  = true
rewrite_csp          = true
rewrite_inline_js    = true
rewrite_request_body = false
strict_misdirected   = false

; ---- [domain_masking] is OPTIONAL — add it only when using multi-host setups ----
; [domain_masking]
; public_host  = shop.example.com
; origin_host  = origin.example.com
; aliases      =