I've run into a couple edge cases now where the built in virtual host templates had no hope of supporting it, which required me brewing my own nginx config.
In all cases, the issue was with server names not being flexible enough in terms of how redirects are handled. The "nginx_aliases" variable is currently a lie; they're not aliases, they're redirects. We actually need both aliases AND redirects.
Requirements
[x] allow real aliases - eg names that are served as part of the same "server" entry, not names that redirect to another name. Use case: Same code base, different "versions" of the website. (eg language-specific versions, or drupal multi site)
[x] Change needs to either be backwards compatible, or this needs to be forked to a new role. The vhost role is used extensively at acro.
I've run into a couple edge cases now where the built in virtual host templates had no hope of supporting it, which required me brewing my own nginx config.
In all cases, the issue was with server names not being flexible enough in terms of how redirects are handled. The "nginx_aliases" variable is currently a lie; they're not aliases, they're redirects. We actually need both aliases AND redirects.
Requirements
Things that will need updating
Ideal outcomes
Complex example:
Normal use case: