Change the cache-control header

SYSTEM INFORMATION
OS type and version Ubuntu 20.04
Virtualmin version 7.10

I have an incorrect Cache-Control header set on all my websites. To change it I added this to Web Configuration > Configure SSL Website

Header set Cache-Control "private"

After that I got 2 headers in my network logs.

image

So I thought, the old header must’ve been added by another config file in apache. I searched all the files in /etc/apache2/ with grep -r -H "Cache-Control" * but got no results. Can someone tell me where this original header is being added from?

It was being set by PHP. Changed the session.cache_limiter to private in the php.ini file.

1 Like

Thanks for posting your solution.

No need to dig too deep – just drop a custom.conf file into /etc/apache2/conf-available/ and add all your tweaks there.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.