Hi Craig,
Thanks for sharing your configuration. It is indeed useful.
I see you use Apache as the backend. In that case, I just shared an alternative solution that uses the best practices on how to use if statement in Nginx. It can be used as a starting point to let other areas to work as well.
Pothi