Description
Describe the Bug
When using headers inside of a directories parameter inside a vhost apache::mod::headers the apache process fails to start
Error: /Stage[main]/Apache::Service/Service[httpd]: Failed to call refresh: Systemd restart for httpd failed!
journalctl log for httpd:
-- Logs begin at Thu 2025-02-20 16:03:52 GMT, end at Fri 2025-02-28 17:44:53 GMT. --
Feb 28 17:44:36 myserver systemd[1]: Stopping The Apache HTTP Server...
Feb 28 17:44:53 myserver systemd[1]: httpd.service: Succeeded.
Feb 28 17:44:53 myserver systemd[1]: Stopped The Apache HTTP Server.
Feb 28 17:44:53 myserver systemd[1]: Starting The Apache HTTP Server...
Feb 28 17:44:53 myserver httpd[229105]: AH00526: Syntax error on line 18 of /etc/httpd/conf.d/25-example.com-80.conf:
Feb 28 17:44:53 myserver httpd[229105]: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration
Feb 28 17:44:53 myserver systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE
Expected Behavior
Webserver to start correctly
Steps to Reproduce
Steps to reproduce the behavior:
apache::vhost { "example.com-80":
port => 80,
directories => [
{
path => '/',
provider => 'location',
headers => [
'always set X-Example "Hello"',
],
},
]
}
Environment
- puppetlabs-apache: 12.2.0
- Puppet 7.34.0
- Platform: Rocky Linux 8