If you ever run into this command it means you need to enable the header module for apache - in most cases this can be done by running:
a2enmod headers
followed by restarting apache with:
systemctl restart apache
If you cannot enable this module, then remove them from .htaccess or whatever is using the headers command