Single-binary self-hosted website analytics on Rust axum: collector API, dashboards, world map, and PDF reports.
analyticsaxumdockerrustself-hostedsqliteviteweb-analytics
1# Caddyfile for analytics
2#
3# I like to use Caddy Server for simple reverse proxies since it has built in
4# automatic HTTPS support.
5{
6 servers {
7 protocol {
8 experimental_http3
9 }
10 }
11}
12
13(common) {
14 header /static/* {
15 Cache-Control "public, max-age=315360000"
16 }
17
18 header /static_maps/* {
19 Cache-Control "public, max-age=315360000"
20 }
21
22 header /* {
23 Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
24 X-XSS-Protection "1; mode=block"
25 X-Frame-Options DENY
26 X-Content-Type-Options nosniff
27 -Server
28 -X-Powered-By
29 }
30
31 encode zstd gzip
32}
33
34analytics.example.com {
35 reverse_proxy localhost:8000
36
37 import common
38}