bradp / vv

:globe_with_meridians: Variable VVV - a VVV Site Creation Wizard.‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ :x: This project is no longer maintained. Please update your copy of VVV , which has most of the vv features built in.
GNU General Public License v2.0
1k stars 90 forks source link

vvv-init.sh not executable by default #339

Closed hlashbrooke closed 7 years ago

hlashbrooke commented 7 years ago

I have a recent installation of Kubuntu 16.04 on which I installed VVV using the guide from the VVV site. I then installed Variable VVV (as I have done before on my previous machine). Since then I created a new site with vv create just like normal - it made the site, created the folder with the hosts file, init script, etc. and the output in terminal all seemed fine (with my username and all). The problem was that WordPress was not downloaded and the database was not created, so I manually ran vagrant up --provision, but it didn't change anything.

To fix the issue I had to SSH into the Vagrant box using vagrant ssh, and run chmod +x vvv-init.sh in the site's folder in order to get the script to work so that WordPress could be installed. After doing that vagrant up --provision worked as expected (downloaded WP, created the database and set everything up as I had specified).

I created another new site after this as a test and the same thing happened again. Is this a known oddity on Linux? Or perhaps some kind of permissions issue that I wasn't aware of?

Happy to provide any additional info that you may need.

breadadams commented 7 years ago

I was having this issue too. I recently ran a clean install of Sierra, and since that (plus a fresh install of vagrant, vv, etc.) it's working again.

zoracon commented 7 years ago

I am also having this issue with clean installs of everything. I did notice the file structure changed in in the the site folders (they now have public_html, provision, etc). Would that affect the path of the install?

vitolob commented 7 years ago

@alexishancock I would recommend you check https://github.com/bradp/vv/issues/340 for a [temporary] solution.

zoracon commented 7 years ago

@vitolob Thanks! I went through that process and I still have the same results.

It turns out the vv-init.sh file created by vv create has some curious lines in it. I'm not completely savvy with this kind of scripting but I know it's creating the wrong directory. It doesn't reflect the new directory I see in the other VVV folders at all.

I see these lines:

    echo 'Installing WordPress (trunk) in custom-site/htdocs...'
    if [ ! -d "./htdocs" ]; then
        mkdir ./htdocs
    fi

Then it proceeds to create htdocs folder & installs wordpress into there.

vitolob commented 7 years ago

@alexishancock Could you be more specific as to what problem exactly are you having? Which process did you go through?

That part of the script is fine. vv installs WordPress inside the htdocs folder.

zoracon commented 7 years ago

@vitolob Sure, sorry for the confusion. So with my comment above, I see in the other site folders, the structure they have is the screenshot below: screenshot 2017-03-13 09 30 39

The "provision" folder I noticed holds these files: screenshot 2017-03-13 09 32 11

However, when I create a new site and manually run vvv-init.sh, the vvv-hosts, vvv-nginx, as well as the vvv-init.sh files are all in the root of the newly created site folder. Not in the provision folder.

With that said, I also noticed when I ran vvv-init.sh, it created a htdocs directory. Which is not the file structure I see in directories like wordpress-default. The wordpress install now lives in the directory public_html.

These may have nothing to do with my issue, but I just wanted to point out this new file structure that I see that doesn't at all reflect the created sites file structure.

vitolob commented 7 years ago

@alexishancock You can name the WordPress install folder however you want. You don't have to follow the file structure the default installations use. I wonder if you're still having an issue that I (or somebody else) can help you with, or you have successfully managed to open your new WordPress site?

PS: The new site provisioner in VVV 2 will look for two files vvv-init.sh and vvv-nginx.conf in the provision/ folder. It will also check for them in the root of the site folder for backwards compatibility (So no problems with the vv file structure). Hence, the default installations putting them in the provision/ folder as you mentioned.

zoracon commented 7 years ago

@vitolob No unfortunately I haven't been able to run a new site. The install folder for wordpress from vv-create creates an htdocs directory in the root. I didn't know you could name htdocs whatever you'd like. The defaults commands from the vvv-init.sh in the new site creates the htdocs folder, so I thought I shouldn't tamper with that.

vitolob commented 7 years ago

@alexishancock So after you ssh into the machine, execute vvv-init.sh and run sudo service nginx restart, you still get a 404 not found? Even after running vagrant up --provision (on your host machine)?

zoracon commented 7 years ago

Okay it turns out I was missing the command sudo service nginx restart. So thank you for confirming my folder structure was not the issue. My site runs now. Thank you so much for walking through this with me.

bradp commented 7 years ago

Closing this, I'm going to start tracking 2.0 support in https://github.com/bradp/vv/issues/348.