Better handling of non-prod Apache config; smarter regex for matching template values