Skip to content
This repository has been archived by the owner on Jun 30, 2020. It is now read-only.

vv not updating /etc/hosts file #368

Open
leifjohn opened this issue Nov 8, 2017 · 16 comments
Open

vv not updating /etc/hosts file #368

leifjohn opened this issue Nov 8, 2017 · 16 comments

Comments

@leifjohn
Copy link

leifjohn commented Nov 8, 2017

I just migrated my vvv installation to an external drive. Now when I create a new site using vv create everything works but it does not appear to be updating the /etc/hosts file. I initially tried to access my new site and received the error:

ERR_ICANN_NAME_COLLISION

I checked the /etc/hosts file and the newsite.dev was not listed, so I copied one of the other vagrant entries for the new site and now it works.

Any ideas how to fix so I don't have to manually edit my hosts file each time I create a new site?

ubuntu 16.04
vv version 1.13
vagrant 2.0.0
VirtualBox 5.1.30

@MickeyKay
Copy link

Same for me.

@yuriy-vasilyev
Copy link

For me too.

@aidil
Copy link

aidil commented Nov 23, 2017

Same issue. Tried a fresh VVV reinstall. VV updates the hosts file for the first time around. But when I add additional sites, hosts file is not updated.

high sierra 10.13.1
vv ver 1.12
vagrant 2.1.0
virtualbox 5.1.30

@SabolchGreba
Copy link

Same here

Vagrant 2.0.1
VVV 2.1.0
V Version 1.13

Latest vagrant-hostsupdater plugin. VVV Dashboard shows newly created sites, everything ok with the site if I add entry to hosts file manually. It's like the hostsupdater plugin does not recognize the new sites created by VV.

@fahimxyz
Copy link

Same here.. guys any find any solutions?

@tomjn
Copy link
Contributor

tomjn commented Dec 11, 2017

vv doesn't fully support VVV 2, do not use it

Instead, add the host to vvv-custom.yml and reprovision, e.g.

  mysite:
    hosts:
      mysite.test
      mysite.com

@Kluny
Copy link

Kluny commented Jan 10, 2018

How much do you think it would it take to get vv to work with vvv2? So far the only difference I can see is that the webroot is named public_html now instead of htdocs, which needs to be changed in several places, and updating the vvv-custom.yml file. It also doesn't create the mysql database.

@yuriy-vasilyev
Copy link

Guys, I found out that using VVV2 without VV is even easier! Plus it's more flexible.
I uploaded my boilerplate project to GitHub, so you can try it yourself.
Here is the link: https://github.com/yuriy-vasilyev/vvv-boilerplate-project

@tomjn
Copy link
Contributor

tomjn commented Jan 11, 2018 via email

@yuriy-vasilyev
Copy link

@tomjn, this is what I actually wrote. I don't use VV anymore and the boilerplate project is all about using VVV2 only.

@tomjn
Copy link
Contributor

tomjn commented Jan 11, 2018

Just answering the question about what it would take to fix vv

@good3n
Copy link

good3n commented Feb 9, 2018

@yuriy-vasilyev @tomjn that's a bummer that VV is not working properly. I don't think that the boiler plate above is easier by any means. VV was just a few questions in the terminal and bam. This with, we have to manually add the site to the YML file, then provision vagrant (which takes a bit of time). Unless I'm missing something, I really miss the simplicity of VV.

@yuriy-vasilyev
Copy link

@good3n, I've used VV more for a year and now I use pure VVV. And I can tell you - it's easier and faster than VV, believe me. It's only about duplicating a couple of lines in vvv-custom and duplicating project boilerplate folder. VV was doing exactly the same including provisioning (there is just no other way to do that). With the new method you can create as many projects as you want AT ONCE, add custom PHP code inside wp-config, install all needed stuff with wp-cli, composer, etc.

@tomjn
Copy link
Contributor

tomjn commented Feb 10, 2018

@good3n you always had to reprovision, but you don't have to turn the entire VM off and on to do that. vv also did things in an unportable non-standard way.

As for ease of use, I would hope anybody using VVV can copy paste YAML, wp-config.php is far more complicated, but should that be too much, it's my goal to have a React app in the dashboard that you can ask questions of, to generate it.

VV was doing exactly the same including provisioning (there is just no other way to do that). With the new method you can create as many projects as you want AT ONCE, add custom PHP code inside wp-config, install all needed stuff with wp-cli, composer, etc.

+1, you can even send your config to somebody else and duplicate your entire workflow on a new machine, with inline comments etc. Copy paste the default site, change its name and change the domain, save, reprovision, done.

  good3n:
    repo: https://github.com/Varying-Vagrant-Vagrants/custom-site-template
    hosts:
      - good3n-is-the-greatest.test

In fact, it can be shortened, this will create a site named banana.test:

  banana: https://github.com/Varying-Vagrant-Vagrants/custom-site-template

@good3n
Copy link

good3n commented Feb 10, 2018

@tomjn I'm not having any issues doing it. It's still very simple, it just takes more time, extra steps. It is what it is. I suppose multiple projects at once can be useful in some situations. It was much more streamlined when it was all done via the terminal.

@good3n
Copy link

good3n commented Feb 10, 2018

I eagerly await the react app.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants