I'm automating a server setup and to install PHP I need to add index.php to /etc/apache2/mods-enabled/dir.conf.
The target content of the file looks like this:
<IfModule mod_dir.c>
DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm
</IfModule>
I need to add index.php before index.html.
It should end up looking like this
<IfModule mod_dir.c>
DirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.htm
</IfModule>
How do I do this with a shell script?
index.php, do you actually need to add it twice?.htaccesinstead of fiddling around in central config (which needs at least a reload of apache processes once changed)