What is better is to store an
httpd.conf.tpl template file with placeholder values in it.
That allows you to generate the right httpd.conf file locally, and to do so automatically on
The generation script will:
- search the right values for any sensitive data from an external secure referential (like a vault)
- replace the placeholder value in
httpd.conf.tplto generate the right
httpd.conf(that can be ignored by Git)
For that, do register (in a
.gitattributes declaration) a content filter driver.
(image from “Customizing Git – Git Attributes“, from “Pro Git book“)
smudge script will generate (automatically, on
git checkout or
git switch) the actual
httpd.conf file as mentioned above.
Again, the generated actual
httpd.conf file remains ignored (by the
See a complete example at “git smudge/clean filter between branches“.
CLICK HERE to find out more related problems solutions.