storebound/tools/vds/apache-storebound-stats.conf

16 lines
821 B
Text

# storebound.dev first-party stats (Umami in /opt/umami on 127.0.0.1:3920), included in the :443 vhost.
# Neutral paths only: /s/p.js (script) and /s/e (collect). See docs/site-analytics.md.
# The real visitor IP: only Cloudflare may set CF-Connecting-IP; Umami reads it from X-Sb-Client.
RemoteIPHeader CF-Connecting-IP
# RemoteIPTrustedProxy lines from https://www.cloudflare.com/ips-v4 and ips-v6 (docs/site-analytics.md)
Include /etc/apache2/cloudflare-trusted-proxies.conf
ProxyRequests Off
<Location "/s/p.js">
ProxyPass http://127.0.0.1:3920/p.js retry=0 timeout=10
Header set Cache-Control "public, max-age=3600"
</Location>
<Location "/s/e">
ProxyPass http://127.0.0.1:3920/e retry=0 timeout=10
RequestHeader set X-Sb-Client "expr=%{REMOTE_ADDR}"
Header always set Cache-Control "no-store"
</Location>