I've got a script that creates multiple instances of a web-application, each with it's own url (e.g host.com/app1, host.com/app2).
What I do now, is create a separate "site" file for apache2 and then enable it (a2ensite under ubuntu). This works, but I eventually end up with a bunch of files in /etc/apache2/sites-available which is ugly.
So the concept is to have a single file for all of the projects with corresponding sections of it being added (no prob) and removed as a web-app gets removed.
Could anyone please share experience on how to make sed search for the pattern like
Code:
<-- web_app_name -->
....
<-- web_app_name -->
and then remove it and everything in-between?
Is it possible with sed at all? (can't imagine the way this could get done)
TIA