Problem:
I want to configure the apache2 access log format for foreman through the foreman installer & custom hiera.
Expected outcome:
The access log format for the foreman virtual host is the default one from apache.
I want to have a different one.
Foreman and Proxy versions:
1.16.0
Other relevant data:
I managed to define a new access log format already:
apache::log_formats:
combined_custom: '%h %l %u %t \"%r\" %>s %b \"i\" \"i\" response_time_integer=%D bytes_in_integer=%I bytes_out_integer=%O'
Which does get saved to /etc/apache2/apache2.conf:
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-agent}i\"" forwarded
LogFormat "%h %l %u %t \"%r\" %>s %b \"i\" \"i\" response_time_integer=%D bytes_in_integer=%I bytes_out_integer=%O" combined_custom
However I fail to make the foreman vhost make use of it.
The hiera I have so far, but seems to be wrong:
apache::vhost::foreman-ssl:
access_log_format: combined_custom
But that doesn’t seem to do the trick, /etc/apache2/sites-enabled/05-foreman-ssl.conf keeps saying:
CustomLog "/var/log/apache2/foreman-ssl_access_ssl.log" combined
Any idea?
Thanks