--- slug: nginx-caching-and-security-headers title: "Nginx Caching and Security Headers" date: "2025-06-08T13:16:00-04:00" --- Yesterday I ported the [caching and security headers][apache-config] from the [Apache][] configuration for the public site to the [Nginx][] configuration for the [Tor mirror][]. The caching headers are particularly helpful for the [Tor mirror][]. The updated [Nginx][] configuration and additional documentation are here: [Site Backend - Onion Service][onion-service]. [apache-config]: {{< relref "articles/site-backend" >}}#apache-configuration "Site Backend - Apache Configuration" [apache]: https://apache.org/ "Apache web server" [nginx]: https://nginx.org/ "Nginx web server" [onion-service]: {{< relref "articles/site-backend" >}}#onion-service "Site Backend - Onion Service" [tor mirror]: {{< relref "posts/2025-05-18-onion-service-mirror" >}} "Tor Site Mirror" [tor network]: https://torproject.org/ "Tor project"