Some config I add to the default apache2 global configuration file
17 May 2021
I manage my own little VPS, it host multiple little web site and service.
I wanted to set some headers by default on all the website so I edited the
/etc/apache2/apache2.conf file and added these:
# Opt out google FLOC # https://paramdeo.com/blog/opting-your-website-out-of-googles-floc-network <IfModule mod_headers.c> Header always set Permissions-Policy: interest-cohort=() </IfModule> # Set cache for common files <FilesMatch "\.(ico|pdf|jpg|jpeg|png|gif|js|css|eot|ttf|woff|woff2|webp)$"> Header set Cache-Control "max-age=63072000, public" </FilesMatch>
This will be set for all the website hosted on this server. They can be overrited if needed.