However occasionally it seems to regenerate and lose the changes, changing back to the default install one. This is not too much of an issue as I can simply detect reverse the changes. However it would be helpful to know what events can cause the regernation and why.
It does not seem to correspond to apache or server restarts. I know SSL certificate updates can trigger it, along with some changes to settings in ther admin portal. However the file regernates recently without either of these occuring.