Reputation: 9664
I am seeing 403 forbidden when trying to visit the url after setting up a homestead VM. I think my paths must be wrong but I cant figure out where..
I am on a Mac.
I have a file on my local machine which contains a Laravel project
/Users/<my-name>/Sites/laravel_projects/public/my-app
My homestead.yaml looks like
folders:
- map: /Users/<my-name>/Sites/laravel_projects
to: /home/vagrant/Code
sites:
- map: homestead.app
to: /home/vagrant/Code/public/my-app
Running vagrant global-status I see.
id name provider state directory
5d79357 default virtual box running /Users/warrenday/.composer/vendor/laravel/homestead
I have tried running homestead provision to restart the VM but I'm not sure if this is needed.
Upvotes: 1
Views: 1307
Reputation: 1652
Assuming you're using standard Laravel file structure, you're doing this the wrong way.
When installing Laravel, your public folder will look like this: my-app/public
not public/my-app
.
sites:
- map: homestead.app
to: /home/vagrant/Code/my-app/public
And not sure if you missed something or its a MAC thing (windows guy here), but /Users//Sites/laravel_projects
doesn't seem right (two //)
And unless you've already done this, you need to make sure that in your hosts file you add 192.168.10.10 homestead.app
(or your equivalent vagrant ip)
Upvotes: 2