-
-
Notifications
You must be signed in to change notification settings - Fork 647
Does drupal-vm actively support multiple domains/virtual-hosts in one vm? #168
Comments
@osopolar - Yes, you can run as many separate docroots, or combinations of single site docroots and multisite docroots, etc., as you'd like. The configuration for this is basically split two ways (all inside
Whenever you make changes to Whenever you make changes to |
Thanks, great. |
ohh, I needed to add a new vhost and did the provision, I assume it re-installs all the packages and takes quite a bit of time ....... |
@ragavendra - Once it does the initial provision, it just confirms all the config is correct; it doesn't need to reinstall anything. If first provision takes maybe 10 min, future provisions should only take 1-2 tops. You can really speed it up if you use a local Vagrantfile to also disable the galaxy role installation (make sure to re-enable it whenever updating Drupal VM though!): http://docs.drupalvm.com/en/latest/other/overriding-configurations/#extending-the-vagrantfile-with-vagrantfilelocal |
ohh I ran into '* The following settings shouldn't exist: galaxy_role_file' , never mind I added the new host within the box ....... |
So this seems like it should work, @geerlingguy. But my question is how do we address this in the documentation?
If you can have multiple sites, wouldn't the core path change from site to site? (Sorry to necro an old issue!) |
I think one of our resident geniuses has answered this. Seems that value is ignored unless you are using one of the site install routines or a build workflow (i.e. composer or make) |
Hm, I think the docs lacks some of the details in geerlingguy answer in this thread. And the "drupal_core_path" info is still confusing ... If this thread still is correct, the docs should be updated. (I found several issues related to this.) |
@hansfn - So, there's a bit of a tradeoff either way. The vast majority of users have only one Drupal site in a given Drupal VM instance, so there are some conveniences and documentation bits that assume one site from the beginner's perspective. Also, most of the However, it is easy enough to add two, four, or hundreds of sites to a VM instance using the apache virtualhosts var (or nginx if using NGINX), the mysql databases var, etc. If doing so, the drupal_* vars will still only apply to the first/default site of the bunch, so if you wanted to do something like have 5 docroots with 50 virtualhosts pointing at them (using multisite or something like Domain Access), then you'd either have to manage the databases/installation manually after the VM is running, or add a post-provision script that does all of that setup post-setup. |
The docs do describe multisite usage http://docs.drupalvm.com/en/latest/deployment/multisite/ |
@geerlingguy Thx for the quick reply. So maybe the best solution is to just have one Drupal site in each instance and stop thinking more about this. I have a habit of being (too) concerned about performance - which is the reason I have waited so long before I started playing with VMs. @joestewart I'm not interested in using multisite. (I'm very familiar with it - used it a lot.) I did read the multisite docs before posting here. Actually, the rather well documented multisite setup made me expect some more info about using multiple separate Drupal installations ;-) |
Sure, the reason I pointed there is the vhost and db portion is similar. Just need to ensure a mount point for the code. |
For small projects or tests I need different domains (different codebase and different database) but I do not want to set up a vm for each domain, and neither I want to use drupal multi-sites for that.
Currently I am still using the code from drupalpro (https://bitbucket.org/mediadoneright/drupalpro, originally from the quickstart vm) in my vm to create virtual hosts like
drush quickstart-create --domain=example.dev
. It works well, one thing I do not like is that I need to manually sett the hosts /etc/hosts entry.What I'd like is to have a vagrant command to just set up a new (virtual) host with database and all that stuff I need to run a new site. Is this possible with drupal-vm? If so, it would be nice to have some instruction in the wiki.
The text was updated successfully, but these errors were encountered: