No laravel sync folders in vagrant manor on windows
I recently installed Vagrant on my Windows 7 machine, I successfully started the VM because I can use ssh, but not syncing between my local project and homestead.
My yaml file is like:
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: /Users/User/Homestead/projects
to: /home/vagrant/sites
sites:
- map: laravel.dev
to: /home/vagrant/sites/laravel/public
hhvm: true
databases:
- homestead
variables:
- key: APP_ENV
value: local
My laravel project is inside the projects folder in my local homestead directory, but it seems that the sites folder that links to it is out of sync with it!
I'm not very good at unix command line, but no wonder the ls -la command works, but only one doesn't work, as I've seen if the tutorials?
update:
After changing the settings of the hosts file for: 127.0.0.1 laravel.dev
before the 192.168.10.10 laravel.dev
site was available in my browser, but the lack of sync issue still occurs (I had to install a new laravel in vangrant), I want to disconnect my project from the "wamp to projects" folder and sync with the "sites" in the estate
source to share
Change your Homestead.yaml In line
---
folders:
- map: E:/projects //your projects folder here
to: /home/vagrant/Code
sites:
- map: homestead.app
to: /home/vagrant/Code/Laravel/public
Now if you are using Windows, open notepad as administrator and hosts
System32/drivers/etc/hosts 192.168.10.10 laravel5angularapp.dev 192.168.10.10 angular2laravel.dev 192.168.10.10 laravel5-angular2.dev 192.168.10.10 yourproject.dev
Now get access to your homestead
homestead up
homestead ssh
Inside the estate
cd Code
ls -a
All your projects should appear here, then
cd ~
then
serve yourproject.dev /home/vagrant/Code/yourlaravelprojectname/public/
Then
sudo service nginx restart
or
homestead reload
Your project must work in
http://yourproject.dev
source to share