I want to use my Centos VM's $HOSTNAME inside a call to sed
like so:
sed -i 's/Apache 2 Test Page/$HOSTNAME Test Page/g' /var/www/error/noindex.html
But this just replaces Apache 2 Test Page
with $HOSTNAME Test Page
... I know I can do it manually, but I've got a good reason for wishing to do it this way.
FWIW, I'm actually doing this inside a bash script that gets called from a Vagrantfile, which in turn provisions multiple VM's (each with Apache2 installed), so that I can test-out the load-balancing capabilities of HAProxy. so I just want a simple way to differentiate between my 3 web-servers, and II figure that modifying the default Apache page is the easiest way to do that.