Replies: 1 comment 15 replies
-
|
Drupal's primary routing technique is often via the hostname. You already know that you can configure multiple hostnames, right, with And you already know that you can omit the hostname from a project's config.yaml and it will use the directory name? And you already know about the classic setup for drupal multisite in https://github.com/ddev/ddev-contrib/tree/master/recipes/drupal8-multisite ? It's not clear to me how your needs aren't already met by |
Beta Was this translation helpful? Give feedback.
15 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Use Case
My use case for this feature is supporting Drupal multisite. For example, I have a project name of
my-drupal-project. I wantmy-drupal-project.ddev.siteto go to thedefaultDrupal site, andother-site-my-drupal-project.ddev.siteto go to theother_siteDrupal site.Related info
I like to setup my DDEV projects so the
nameconfiguration value is not set directly in a YAML file. So, it is dynamically determined based on the name of the directory the DDEV project sits in. This allows me to simultaneously run the same project side by side on the same host simply by dropping the same codebase into different directories.Possible approach
In the use case given, the project name is
my-drupal-project. DDEV takes this and uses it to calculate the reverse proxy routing rules. To satisfy the use case, I would like DDEV to set the rule such thatmy-drupal-project.ddev.siteis matched as well asother-site-my-drupal-project.ddev.site. Looking at the project's generated Traefik config file, the rule looks like the following:an alternative to this that would satisfy my requirement would be to simply remove the opening caret:
Maybe a boolean configuration flag could be introduced for enabling or disabling the incorporation of the caret? Something like...
...where a
falsevalue prefixes the regex rule with a caret, andtrueomits the caret. Default would befalsefor backwards compatibility reasons.Beta Was this translation helpful? Give feedback.
All reactions