Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In #705026: Allow creation of example.com/foo and example.com/bar type of sites (Part I), we introduced subdirectory support. However, it won't allow a site at both example.com and example.com/foo. Part of the solution may be to #2020087: Use the <Location>-based approach from subdirs for all site vhosts.
Comments
Comment #1
anarcat CreditAttribution: anarcat commentedi started looking into this - it can actually be fixed quite nicely.
This has been committed to the resurrected dev/subdirs branch in the backend. As the commitlog says:
This wasn't tested in any way.
Comment #2
ergonlogicThis results in the following warning and an inaccessible subdir site:
Comment #3
omega8cc CreditAttribution: omega8cc commentedPlus, this patch introduces Apache-centric fix? The
function subdirs_provision_apache_vhost_config
doesn't belong insubdirs/subdirs.drush.inc
Comment #4
omega8cc CreditAttribution: omega8cc commentedAll related fixes (tested many times with Nginx based install) committed, as listed below:
http://drupalcode.org/project/provision.git/commit/21e945a
http://drupalcode.org/project/provision.git/commit/4c803c0
http://drupalcode.org/project/provision.git/commit/3726128
http://drupalcode.org/project/provision.git/commit/5e2bb34
http://drupalcode.org/project/hosting.git/commit/c250415
Comment #5
omega8cc CreditAttribution: omega8cc commentedJust to summarize: now no vhost will be overwritten if the "parent" site already exists. Instead, the extra include line will be appended and the "parent" site auto-magically re-verified in the backend, once referenced by any other site in its subdir. We have also modified the alias check procedure in the frontend to allow it to work if the "parent" site already exists.
Comment #6
anarcat CreditAttribution: anarcat commentedthat's... awesome! thanks!
Comment #7
omega8cc CreditAttribution: omega8cc commentedA few more commits are needed after extensive testing.
Comment #8
omega8cc CreditAttribution: omega8cc commentedMore improvements after extensive testing (and a few destroyed instances):
http://drupalcode.org/project/hosting.git/commit/5ab0e8c
http://drupalcode.org/project/hosting.git/commit/10f38a0
http://drupalcode.org/project/provision.git/commit/7acac7b
http://drupalcode.org/project/provision.git/commit/f4e4098
http://drupalcode.org/project/provision.git/commit/e4dab7b
http://drupalcode.org/project/provision.git/commit/8180c5d
http://drupalcode.org/project/provision.git/commit/dd95643
To quote the comment from latest commit:
Comment #9
omega8cc CreditAttribution: omega8cc commentedI tend to close this as fixed. We don't know how/when we will be able to safely automate the parent site re-verify, so for now here is improved built-in how-to: http://drupalcode.org/project/hosting.git/commit/37ce532