I am attempting to set up Homestead on a Windows 10 machine using VirtualBox and Vagrant so it can live in a virtual machine.
Using Git Bash, here is the sequence of steps thus far -
connect to Homestead virtual machine using vagrant ssh
run this command to create a new project called Laravel:
look at folders in Homestead directly on VM:
So far, so good.
Now here is where things don't seem to be working properly -
look in storage location on host operating system where Homestead.yaml is configured to park files
but there are no files there
Two questions:
What needs to be changed so the files appear in the designated location on Z:?
Once the change has been made, how will the files appear there when the project has already been created on the VM?
EDIT:
I was able to remove the original Laravel project using the comment below from #dparoli. After cd code I executed composer create-project --prefer-dist laravel/laravel Laravel but encountered the error shown below: [ErrorException] mkdir(): File exists. I'm guessing there's left over stuff from the first attempt. What should be done to clear up the error?
Related
I just followed the manual at the laravel website and installed homestead.
When running vagrant up it runs fine and I can connect using vagrant ssh.
There is only one step I can not find, how do i start a new laravel project using the vagrant installation.
I can ssh to the vargant machine so I assume I should run laravel new someproject somewhere on the vagrant environment?
In my Homestead.yaml I have:
folders:
- map: D:/Documents/repos/someproject
to: /home/vagrant/someproject
sites:
- map: someproject.test
to: /home/vagrant/someproject/public
Where someproject is currently empty as i want to start a new project and not work on an existing one. I do not have composer/php/mysql on my windows machine but I assume the benefit of the vargant box is that it has all the needed dependencies and I should run it in vagrant.
I tried running it in /home/vagrant but i got:
laravel new someproject
In NewCommand.php line 110:
Application already exists!
new [--dev] [--auth] [-f|--force] [--] []
'
So how do I start the new laravel project after installing vagrant?
The message says that the application someproject already exists. Does the folder already exists in /home/vagrant?
Make sure to add the domain to your hosts file. For Ubuntu, this would be in/etc/ folder. If you want to access your website through someproject.test add
192.188.10.10 someproject.test
to your hosts file.
The site link has to be mention in you Homestead.yaml
sites:
- map: someproject.test
to: /home/vagrant/somneproject/public
Make sure to call
vagrant reload --provision
after saving the changes.
Now if you type someproject.test into the browser you should see the default page (assuming you have generate the key for your laravel application, otherwise you may get an error).
I just installed Ubuntu 17.10 and I want to try create a website using Laravel, but I hit a rock, I followed the instructions. step by step on the official website. But I think something is missing,
Because I haven't touch / edit anything in Homestead.yaml, so basically it would working right?
I already use vagrant up --provision. already create the ssh key. I already googled it and try several ways but it doesn't fix it, I already turn on my XAMPP as well
Sorry but I never touched Ubuntu before, so I'm very blind using this OS
Here is my Homestead.yaml file
Homestead.yaml
and the directories of /home/workspace/ and /home/workspace/Homestead/
~ Dir
Homestead Dir
my Hosts file
Hosts File
EDITED:
I just create a new project in ~/Homestead/Projects/[it goes here] because the default laravel installation is working already, so now I want to create a new project in Projects folder inside Homestead, but why it redirect the url to https?
The folders
in this screenshot: https://i.stack.imgur.com/4cxGy.png Your ~/code folder appears to not exist, which means Homestead will not map it. Create that folder in your Host OS (Ubuntu 17) and then run vagrant destroy && vagrant up If you still have issues post the entire output here for us to check.
For my last question, why when I tried to open my new projects is always giving me this error your internet connection is not private. it's because I'm using .app or .dev in the of the site name, the problem is from google chrome, so I need changed it to .test then it's working perfectly.
I got the answer from this site
https://laracasts.com/discuss/channels/laravel/chrome-blocked-localhost-with-error-your-connection-is-not-private
I am using Vagrant with Homestead on Windows 10 to sync my Laravel app to virtualbox.
Everything seems fine until i run laravel app in browser via custom domain like laravel.app then i get error No input file specified.
When i ssh into virtualbox i see that no files have been added from my project folder.
My homestead.yaml is most definitely configured correctly and i have entry in hosts file for custom domain.
I use all the latest versions and i did vagrant provision
I think my problem is somewhere in virtualbox but don't know where.
Here is my homestead.yaml config file http://pastebin.com/nJCqD4Qq
I created a Laravel webapp running on a homestead vm on my Windows 7 machine. I want to take this webapp and move it over to my raspberry pi so it's easily accessible from my other devices, since my decsktop doesn't have a direct connection to my router.
I have my pi setup with apache2 and Laravel all the way to the point that if I create a Laravel project in /var/www using
php ~/composer.phar create-project --prefer-dist laravel/laravel project
Then I can access it through the URL:
192.168.1.232/project/public
However, when I pull the webapp I created on the homestead machine through get and place it in /var/www on the pi, I get a page isnt working, currently unable to handle request error.
Does anyone know what files I would need to change/git ignore to develop Laravel on my windows machine and then pull certain versions to my pi without creating errors?
EDIT: I was able to fix this issue by looking at the git ignored files. Two necessary files, /vendor and .env were being ignored when I pushed my project to git. All I did was recreate the .env file in my project directory on my pi, and move a copy a vendor file over from a project I created on the pi, and my webapp started to work.
I have followed the instructions here: http://laravel.com/docs/5.1/homestead to get a local Homestead VM. It worked perfectly and I got Laravel up and running (serve homestead.app /public) and synced to a folder on my host machine (say ~/Code).
After trying to get Xdebug running, I messed up with a few configuration files (nginx.conf, php.ini, etc.). and thus, I destroyed that VM instance by running "vagrant destroy default". I then boot-up the VM again ('vagrant up') and ssh into the box. The files which I changed were reverted (expected) and the ~/Code directory had the Laravel sample app which I had created previously (again, expected as it was copied over from my host machine).
What I don't get is why the server was still running successfully and I could access my sample app from my host machine? I never ran 'serve homestead.app /public' again and yet the server was already running serving the /public folder. I find this very confusing.
So what’s the correct way to destroy and recreate Homestead VMs?
Cheers, SK.
Destroy command does't remove box.
Here is docs. https://docs.vagrantup.com/v2/cli/destroy.html
To delete it:
homestead yourbox remove
if it doesn't work, try
vagrant yourbox remove