We have a cloud-config script to do some work on a server right after creation. (Digital Ocean droplet)
I want the script to modify the default behavior for apache, setting the AllowOverride to All (default value is None) for the /var/www Directory.
To do this manually, I would simply change the apache config file (/etc/apache2/apache2.conf) to the value below.
<Directory /var/www/>
AllowOverride All
However, I want to make the change automatically somehow using cloud-config.
Is there a better way to do this?
(Note: I don't want to use the write_files directive simply overwrite the entire apache2.conf file with our own custom version for fear of forward incompatibility with future apache versions)