Correct way to enable /pub on Foreman?

I have been just dropping a file pub.conf into the /etc/httpd/conf.d/ directory.

The file is tiny it looks like:

Alias /pub /var/www/html/pub

<Location /pub>
PassengerEnabled off
Options +FollowSymLinks +Indexes
Require all granted

The problem is that any time the foreman-installer gets run it removes the file.

What is the correct way to enable /pub and not have to put a file back every time?

This seems to be the same for Foreman version 1.16 thru 1.20 and probably even older.

Thanks for any direction or help!

There was a puppet/hiera trick @ekohl teached us the other day, can’t remember.

Currently there’s no clean way to do this but I’d like to add this as a possibility because multiple people have requested this.

There is apache::purge_configs which you can set via custom-hiera.yaml but I consider it unsupported because it’s untested and things might break in unexpected ways.